Definition: The task is to generate the correct answer for a given math problem.
Input: Problem: on the first day of her vacation , louisa traveled 160 miles . on the second day , traveling at the same average speed , she traveled 280 miles . if the 160 - mile trip took 3 hours less than the 280 - mile trip , what was the average speed , in miles per hour ?
Output:
40