One steam locomotive traveled half of the way at a

One steam locomotive traveled half of the way at a speed of 80 km/h, and the other half at a speed of 40 km/h. Another locomotive traveled half the time at 80 km/h and half the time at 40 km/h. What is the average speed of each steam locomotive?
10575. A detailed solution with a brief note of the conditions, formulas and laws used in the solution, the derivation of the calculation formula and the answer.
If you have any questions about the solution, write. I try to help.