2 of 4 deleted 29 characters in body; edited tags; edited title

How did the time to Earth get shortened?

So here's a question to test your knowledge, but honestly speaking, I missed a scene or an episode so I need to rewatch it to make things clear. I will explain.

I am currently in Season 5 episode 1. Chakotay was discussing with 7 of 9 (Borg Lady) that they have been travelling for months through the expanse and that he doesn't know how they will last 2 years travelling.

I thought they were going to take like 50 years or so to get back to Earth. It seems I missed something out and I'm unable to connect the dots. Did they get a new engine or something? Did they again get thrown ahead in space (but that far?)

The question is: Which episode made them reduce their time to make it to Earth?