Average speed is defined as total distance ÷ total time. It is not the average of the speeds. The two agree only when each speed is held for the same length of time. In most exam questions the speeds are held over the same distance, which means the slower leg takes longer and drags the average below the simple mean.
So the first question to ask is: are the distances equal, the times equal, or neither? Each case has its own short formula, and all of them come from the definition.