The signal travels in a straight line, the distance between the spaceship and the ground station is equal to the total distance travelled by the signal.
The distance of the spaceship from the ground station
5 minutes = 5*60 seconds = 300 seconds.
Speed of the signal = 3 × 108 m/s.
Therefore, total distance = (3 × 108 m/s) * 300s
= 9*1010 meters.