Answer
(a) average speed = 48.1 mph
(b) average speed = 50 mph
Work Step by Step
(a) $t_1=\frac{d}{v} = \frac{50 ~mi}{40 ~mph}$
$t_1 = 1.25 ~hours$
$t_2=\frac{d}{v} = \frac{50 ~mi}{60 ~mph}$
$t_2 = 0.833 ~hours$
total time = $t_1 + t_2$
total time = 1.25 h + 0.833 h
total time = 2.08 hours
average speed = $\frac{100 ~mi}{2.08 ~hours}$
average speed = 48.1 mph
(b) Let t be the time spent driving at each speed.
total distance = 40t + 60t
total time = 2t
average speed = $\frac{40t+60t}{2t}$
average speed = 50 mph