Average speed first.
2 x 40 = 80 km
3 x 30 = 90 km
Total 170 km in 5 hours = 170/5 = 34 km per hour.
Average velocity is somewhat different, as direction is important.
The two directions travelled are at right angles to one another, so using Pythagoras’
Theorem, the net distance travelled in a straight line, if this were possible, would be square root (80^2 + 90^2)
= SQRT(6400 + 8100) = SQRT (14500) =
120.42 km, in 5 hours = 24.08 km/h