I belive it would be 12x + 12y
First half: 30 miles per hour for 20 miles. Time taken:

Second half: 12 miles per hour for 20 miles. Time taken:

In total, he traveled 60 (30+30) miles in 4 hours (1.5+2.5), for an average speed of

https://www.mathpapa.com/algebra-calculator.html?q=f(x)%3D2x%5E2-7x%5E2%2B2x%2B3
Answer:
3+x sqrt 7 -13 is a radical equation.