It's never occurred to you that Luke was on Dagobah for however long it took the Falcon to get from the asteroid belt to Bespin at sub-light speeds (Remember, they didn't have a working hyperdrive.) has it?
I mean, I was 10 at the time & I figured out that there should've been a caption that read: "And time passed...." That I wasn't seeing these two events play out in real time, but rather snippets.
Ships often have back up hyperdrives I'm SW. They're generally slow.
New canon afaik doesn't cover it, iirc the old does but I would have to look it up.