You are travelling to point B from point A at a speed of 30mph. You travel back to point A from Point B (taking the same route) at 60mph. What is your average speed?
total distance : 2X, x being the distance between a and b
total time: x/30+x/60
average speed: distance/time=2x/(x/30+x/60)=3600x/(30x+60x)=3600/90=40 mph