Let " d " be the full distance. Then the time to drive= = hours; the time to run = = hours. = = = = = = = 25 miles per hour. ANSWER
dear greenestamps, you are not right (!!) The problem says it directly and explicitly : " . . . A quarter of the way he ran out of petrol." Not a quarter of the time . . .
With the student drivingof the distance, and at 50 mph, time spent driving =
With the student runningof the distance, and at 10 mph, time spent running =
Average Speed =
Average Speed =, with D being total distance