Is the average speed 50mph, if I travel 100 miles at 40mph and 100 miles at 60mph?
The average is below 50 because you are traveling at the lower speed for a longer period of time
This is why, if you run the 400m on a 400m track, your best option is to have no wind... the advantage you would get from having the wind in your back is less than the disadvantage from running into the wind since you are running into the wind for a longer period
Here's a thought experiment that may help:
Imagine that you travel the first $100$ miles at $100$ miles per hour and then teleport instantaneously for the second $100$ miles. Then your average speed is clearly $200$ miles per hour (total distance over total time).
What would your method give as an answer?
You can't simply average speeds.