@alisonkiddle love this (and yes very confusing for many students)
Must find out total distance divided by total time to get average speed, not just average the speeds.
Two methods:
Assume whole distance = 120 for ease of calculation, then each half of journey = 60
Distance = Rate • Time or D = RT
60 = 60 • T
1st part takes 1 hour
60 = 40 • T
2nd part takes 1.5 hours
Total distance = 120
Total time = 2.4 hours
Ave speed = 120/(5/2) = 240/5 = 48 mi/hr or 48 km/hr