A train traveled p miles in 40 minutes and completed the remaining 200 miles of the trip in q minutes. What was its average s...

Answer: 
60(p+200)/ (40+q)
A train traveled p miles in 40 minutes and completed the remaining 200 miles of the trip in q minutes. What was its average speed, in miles per hour for the entire trip?