For instance, if I had gotten 25 MPG on the out leg, and 40 MPG overall, your averaging method would have had considerable error.
I'm sorry, my math must be really off, but how is the answer to this one not 55 MPG? Isn't the total distance the key? If the distance there and back was the same, wouldn't Bruno's math work?
No.
25 MPG on the way out would have used exactly 10 gallons of gasoline to get there. [250 miles per 10 gallons = 25 miles per one gallon]
40 MPG for the whole trip would have used exactly 12.5 gallons of gasoline. [500 miles per 12.5 gallons = 40 miles per one gallon]
Using 10 gallons on the trip out, and 12.5 gallons total, that would leave just 2.5 gallons for the 250 miles return trip, requiring 100 miles per gallon, not 55.
As Peter pointed out earlier, it's like the classic, non-intuitive average speed problem: Average 25 MPH for the first half of the trip, how fast do you have to go to average 50 MPH overall? The answer? It can't be done because to average 50 MPH you have to do the entire trip in a certain amount of time, and you've already used up that entire time allotment in the first half of the trip.
So, by analogy, if I'd averaged 20 Miles per Gallon on the trip out, and 40 MPG on the overall trip, 40 MPG still means a total fuel consumption of 12.5 gallons, but I would have used all 12.5 of those gallons in the first half of the trip, requiring an infinite MPG for the return. Maybe if the return was
all downhill...
I'll let Peter and Bitt fight it out over the Liters per 100 KM vs. Miles per Gallon concept, but here's a clue: Division is not a commutative function.

tanstaafl.