Cyberjadugar's math is dead on!
There is another way to approach this problem, however--backsolving. Because the answers are numbers in ascending order, and because the task we are assigned is simple (not the same as easy! A speed is simple, the sum of the squares of two speeds would be complex), we can plug those numbers back into the task to see if they work.
With backsolving, it's useful to start at B or D. This maximized our chances of getting the answer right on the first try. If B is too big, or if D is too small, then we immediately know that A or E is correct, respectively.
But B clearly doesn't work here. The total distance traveled is 40 miles, and the total time is two hours. The average speed for the
whole trip needs to be 40/2 = 20 mph, so 20 for only the second half won't cut it.
Let's try (D). 20 miles at 15 miles/hour takes 4/3 of an hour. 20 miles at (D) 30 miles/hour takes half that time, 2/3 of an hour. So the whole trip takes 6/3 = 2 hours, just what we wanted!
You may think, "How lucky!" but actually luck played no part. After all, what if we'd been wrong? Well, if we'd spend too little time making the trip, we'd have known that 30 was too fast. Since 20 was too slow, we could have marked (C) as correct without doing a bit of math! And similarly, if we'd been to slow even at 30, we could have just mark (E) and been done. Part of the power of backsolving as a strategy is the ability to use the answer choices as a powerful problem-solving tool.
Good luck on your prep!
_________________