The avg of the avg speeds would be 25 km/h only if the we spent the SAME AMOUNT OF TIME traveling at each speed. Here, the DISTANCES TRAVELED rather than the TIMES TRAVELED are the same. So, the total avg. speed is weighted toward the slower avg. speed.
Prentice-Hall, 'College Physics' fourth edition