Answer
40 mi/h
Work Step by Step
By definition average speed is calculated by dividing the total distance that something has traveled by the total amount of time it took it to travel that distance.
$$v_{aver}=\dfrac{S_{total}}{t}$$
We know that for the frst half of the distance she drives at the speed
pace of 30 mi/h. So the time it takes for her to travel the first half of the distance is
$$t_{1}=\dfrac{\frac{S_{total}}{2}}{30 }.$$
Similarly for the second half of the distance which she drives at the speed pace of 60 mi/h.
$$t_{2}=\dfrac{\frac{S_{total}}{2}}{60 }$$
Total time required to drive all the way equals
$$t=t_{1}+t_{2}=\dfrac{\frac{S_{total}}{2}}{30 }+\dfrac{\frac{S_{total}}{2}}{60 }$$
Let's simplify the expression.
$$t=\dfrac{S_{total}}{2}(\dfrac{1}{30}+\dfrac{1}{60})=\dfrac{S_{total}}{40}$$
Now we can find the average speed
$$v_{aver}=\dfrac{S_{total}}{t}=\dfrac{S_{total}}{\frac{S_{total}}{40}}=40 mi/h$$