Question 938296
Key to solving this question is to work with consistent units.
By writing units at every step, we can ensure that units are correct.

Important formula:  Distance = speed * time    (* is used to mean multiply)

40 km = 5.8 m/s * time
Convert 40 km to metres (1 km = 1000 m)
40000 m = 5.8 m/s * time
Divide by 5.8 m/s on each side and switch sides,
time = 40000/5.8 s
= 6896.6 s
Convert to hours and minutes (1 hour = 60 minutes, 1 minute = 60 seconds)
time = 6896.6 s = 1 hour + 3296.6 s = 1 hour + 54 minutes + 56.6 seconds

Answer: It takes the runner 1h 54m 56.6s to finish the Boston Marathon.