How could the Yamato make it back in time?
Time dilation is not an issue here because the Yamato is travelling using warps.

Krazer explained in chat that the Yamato warps work by folding space. 

The theory of time dilation applies if you travel at faster-than-light speeds. However, in this case the Yamato is making short jumps or warps through space. The idea is similar to if you had a piece of paper with two points on it. Normally, the shortest path from Point A to Point B is to draw a straight line between the two points. However, one can cheat and fold the piece of paper to make the distance between these two points shorter in 3D space. 



This is the same thing the Yamato is doing when it is warping. Since they are not actually travelling at a faster speed, just getting to the destination faster, they can attempt to make it back in time without worrying about time delation.