A tourist calculated that if he walks to the railroad station with a speed of 4 mph, he’ll miss the train by half an hour, but if he walks with a speed of 5 mph, he’ll reach the station 6 minutes before the departure of the train. What distance does the tourist have to cover?