The Enterprise is at the Romulan Neutral Zone and then heads for Earth where the Borg cube is practically on top of the planet. That's what is in the film and it's just as dumb as the Enterprise making it to the heart of the galaxy in no time at all in TFF.
They're movies. For one, we have no idea how long it would have actually taken the Enterprise to reach Earth. Film, television and theater always have unexplained gaps from one scene to the next. We also don't know exactly how long the battle was.
Actually, I think the Okuda's could tell us how long it would take to travel from the RNZ to Earth at maximum warp.