

Let a = average speed for the trip
let d = half the distance
time = dist/speed
So, d/40 + d/60 = 2d/a
we dont need d, divide thru by d and you have
1/40 + 1/60 = 2/a
multiply by 120a to clear the denominators, results:
3a + 2a = 120(2)
5a = 240
a = 240/5
a = 48 km/hr
