Answer
The average speed is $40~mi/h$
Work Step by Step
Let the total distance be $2d$
We can find the time for the first half of the distance:
$t_1 = \frac{d}{30}$
We can find the time for the second half of the distance:
$t_2 = \frac{d}{60}$
We can find the total time:
$t = \frac{d}{30}+\frac{d}{60}$
$t = \frac{2d}{60}+\frac{d}{60}$
$t = \frac{3d}{60}$
$t = \frac{d}{20}$
We can find the average speed for the entire journey:
$v = \frac{2d}{t}$
$v = \frac{2d}{d/20}$
$v = \frac{(2d)(20)}{d}$
$v = 40$
The average speed is $40~mi/h$