Answer:
Let's call x the number of hours spent on the job.
Cheap car shop charges a total (we'll call it T) equal to 77+31x.
Best Repair in Town charges 150.
The sistem is:
T=77+31x
T=150
Solving it you can find the number of hours x that would take Cheap Car Shop to do the job and have a pay equal to the one of Best Repair in town. Under x, Cheap car shop is more convenient, over x, Best Repair in town is more convenient.