You can also say:
The only way to reach your goals is to make sure you are doing the right things.
(I don't know what those other "sentences" are supposed to mean.)
"The best time for/of 100 mph" would mean, for example, how fast a car can reach 100 mph. Let's say a car accelerated 5 times from 0 to 100 mph and the best time was 10 seconds. So we would say, "The best time for/of 0-100 mph was 10 seconds". But I am not sure I should use "of" or "for".
For "the risk of/for having fun", I can write this: "Yesterday, they jumped with parachutes from a building. I Know it's risky, but it's the risk of/for having some fun". Again, not sure I should use "of" or "for".