You cannot average the two speeds in conditions of equal distance. You need equal time..
Look at it this way: 15 m/s for 10 km would take 666.67 seconds.
25 m/s for another 10 km would take 400 seconds. Total time: 1066.67 seconds. Total distance 20 km. This average speed 20000 m/1066.67 seconds = 18.75 m/s.
If you had gone 15 m/s for the same *time* as going at 25 m/s, then you could have averaged the speeds directly.
To get a real feel for this, imagine going at 1 m/s for 10 km, and then going at the speed of flight for the other 10 km. The first part would take 10000 seconds (nearly 3 hours) and the second almost zero time. Would your average speed be half the speed of light?