This Is a Certified Answer

Certified answers contain reliable, trustworthy information vouched for by a hand-picked team of experts. Brainly has millions of high quality answers, all of them carefully moderated by our most trusted community members, but certified answers are the finest of the finest.
Answer to this question is NOT straight forward as taking average of speeds.  People often make mistakes.  Such an average is correct only when I travel for equal durations of time.
Let us assume I travelled from  A to B, a distance of S miles at 20 mph and then returned back to A at 30 mph.

         Average speed = total distance travelled / total time duration.

So we have to find the quantities on the RHS.

       Time taken to go from A to B = S / 20   hours
       Time taken to return from B to A = S / 30 hours 
total time = S [ 1/20 + 1/30 ] = 5 S/60 = S/12 hours

        Average speed = (S+S) / (S/12) = 24 mph