The honest average
Real trips change pace — highway, roadwork, back roads. The average speed of the WHOLE trip is still just , fed the totals: total distance over total time. Add up every kilometre, add up every hour, divide once. That is the whole method. The legs get numbered as you meet them: is the first leg's speed in km/h and the hours it lasted, and belong to the second leg, a third leg would wear a 3 — the little number is only the leg's place in the trip, never a different kind of quantity.
The trap this lesson exists to disarm: averaging the speedometer numbers — — feels natural and is quietly wrong. A leg that lasts longer counts for MORE of the trip, and the shortcut treats every leg the same. It only tells the truth when the legs last exactly equal times, which real trips almost never arrange. Totals first, divide last — that average never lies.