I believe the best way to rewrite the sentence is the last option: "The idea behind the formation of clouds in the sky is the same idea behind the way steam rises from a Locomotive, or the way you can see your breathe on a cold day." This is because it is the only sentence that doesn't sound like a run-on sentence. It also has correct grammar.