rajataga wrote:I applied weighted averages,
[25(10) + 40(50)]/(10+50) = 37.5
what am i doing wrong?
It's very tempting to do just that, but unfortunately, it's not quite correct. It might be easier to see why by using a different problem:
Al drives 120 miles at 60 miles per hour, and 120 miles at 30 miles per hour. What was his average speed?
If you treat this as a weighted average, and you use the ratio of the distances as your weights, you'd incorrectly think his average speed was 45 miles per hour. This is a weighted average problem, but it's weighted by the time spent at each speed, not by the distance traveled at each speed: because Al spends twice as long driving at 30 mph, his average speed will be 'twice as close' to 30 as it is to 60. In other words, his average speed will be 40 mph.
The same is true for the question in the original post above. If you want to treat it as a weighted average question, you can't use the distances as your weights; you need to use the gallons as your weights. This can get a bit confusing, so my advice would be to avoid using weighted average principles when dealing with any kind of rate or ratio, as in an average speed problem or a problem like the above, unless you really know what you're doing. Otherwise it's easy to get a wrong answer.