Driver's payment is $17/h
Truck maintenance is $1.75/mile
For a trip the driver drove an average of 40 miles, the total expenses for the trip were $522
If y is the number of miles driven and x the number of hours it took the driver to finish the trip.
The total cost of a trip can be calculated as:
17x+1.75y=522
In the trip he drove and average 40 miles per hour for the duration of the entire trip, that is "x" hours. So
y=40x