Don’t you need a Blue Whale and a spaceship to time travel?
Nope, it's a sperm whale, and it wasn't time travel.
The Magrathean sperm whale was the co-product of the Infinite Improbability Drive and its reality-warping field interacting with two guided missiles above Magrathea, the other outcome being a bowl of petunias. The probability of this occurring was 8,767,128 to 1 against.