We know that the total cost is $1700 and the total work hours are 15.
We will call x the number of hours worked by the first mechanic and y the number of worked hours by the second mechanic.
The total work hours is the sum of x and y and equal to 15:

The cost of each mechanic is the price per hour multiplied by the work hours, so we can write:

We have a system of linear equations.
We will solve it by substitution.



Answer: the first mechanic worked 10 hours and the second mechanic worked 5 hours.