What's wrong with my formula? I'm learning about rational functions, and encountered this word problem:

A helicopter flies from Vancouver to Calgary a distance of 677km with
a tailwind. On the return trip the helicopter was 40km/h slower. The
total flying time for both flights was 6.5 hours. How fast was the
helicopter flying to Calgary? Round the answer to the nearest
hundredth.

Without looking, I tried:
$$\text{Total distance} / \text{Avg speed} = \text{Total time,}$$
$$\frac{1354}{s-20} = 6.5.$$
Which gives $(228.31 , 0)$ and looks more or less correct.
But the given solution is modeled as:
$$\text{Time with tailwind} + \text{Time with headwind} = \text{Total time}$$
$$\frac{677}{s} + \frac{677}{s-40} = 6.5.$$
Giving $(230.21,0)$.
I can tell at a glance that the given formulation is more precise and thus more likely to be correct. But as far as I can tell, what I came up with should work too. Where did I go wrong?
 A: Your error was thinking that the average velocity was $s-20$. It is a common error.
Here’s a specific example:
Imagine you travel 60 km back and forth; if you travel the trip out at 60 kph, and the trip back at 40 kph, the average veloicity is not 50 kph, because your travel took two and a half hours, not two hours. So the average velocity turns out to be 48 kph.
When you divided by $s-20$, you asserted that because the trip out was done at $s$ kph, and the trip back at $s-40$ kph, then the average velocity was $\frac{1}{2}(s+s-40)=s-20$. It is not.
That’s your mistake, and why the solution divides the two trips, one at $s$ and one at $s-40$.
A: No, your method is not correct. It assumes that the average speed was the average of the speed of the first part of the trip and of the speed of the second half. That is wrong. Let us take a simpler example. If cities $A$ and $B$ are $50$ km apart, if I go from $A$ to $B$ at $100$ km/h and then I go back at $50$ km/h, then I spent $3$ hours on the road. So, the average speed was $100/3(\approx66.7)$ km/h. But the average of the speeds is $75$ km/h.
A: In general, the average speed equals the weighted average of the speeds of the onward and and return trips (weighted by the respective durations).
In particular, if the two trips take the same time, then the average speed merely equals the simple average of the onward speed and the return speed; in this case, the two (equal) trip durations have been implicitly accounted for.
In our problem, since the two trips have different durations, it is false that the average speed is just $\displaystyle\frac{s+(s-40)}2.$
A: $\underline{Case.1}$ Let $(V_1,T)$ & $(V_2,6.5-T)$ be the speed and time of the helicoper from  Vancouver to Calgary and Calgary to Vancouver respectively  . As , $V_1>V_2$ and $T<6.5$ then , $(6.5-T)>T$ . So : $$V_1=\frac{677}{T}$$ and , $$V_2=V_1-40=\frac{677}{6.5-T}$$
Use value of $V_1$ in the above equation , $$\frac{677}{T}-40=\frac{677}{6.5-T}$$
You'll get $T\approx\{\not37.4,2.9\}$ and $V_1\approx233.4$
$\underline{Case.2}$  Let $(V_1,6.5-T)$ & $(V_2,T)$ be the speed and time of the helicoper from  Vancouver to Calgary and Calgary to Vancouver respectively . So , $T>(6.5-T)$ $$V_1=\frac{677}{6.5-T}$$  Hence , $$\frac{677}{6.5-T}-40=\frac{677}{T}$$
From here , $T\approx\{\not{-30.9},3.5\}$ and $V_1\approx79.1$
