Definition: The task is to generate the correct answer for a given math problem.
Input: Problem: john and beth each drove from smallville to crown city by different routes . john drove an an average speed of 40 miles per hour and completed the trip in 30 minutes . beth ' s route was 5 miles longer , and it took her 20 minutes more than john to complete the trip . how many miles per hour was beth ' s average speed on this trip ?
Output:
30