We must look at this question in steps The first half of the journey is travelled at 40 km/h Half of 100km is 50 km Using the formula Distance = Speed x Time Speed = Distance / Time Time = Distance / Speed We can work out the time:
50km / 40km/h = 1.25 hours
Next we look at the second half of the journey 50km at 80km/h 50km / 80km/h = 0.625 hours
Add together both times to work out how long the entire journey took 1.25 + 0.625 = 1.875 hours
Using the Speed formula from before Speed = 100km / 1.875 = 53 1/3 km/h or 53.3 recurring km/h