Average speed is always Total Distance $\div$ Total Time --- never the arithmetic mean of individual speeds unless the time durations are equal. If a car covers the first half in time $t_1$ and second half in time $t_2$, the average speed is $\dfrac{d}{t_1+t_2}$, not $\dfrac{v_1+v_2}{2}$. Always go back to the basic formula.