A man traveled a certain distance by train at the rate of 25 km/h and walked back at the rate of 4 km/h. If the whole journey took 5 hours 48 minutes, the distance was?