Let x represent the number of miles driven. Then the charges from the first agency are ...
... c1 = 17 + 0.07x
and those from the second agency are ...
... c2 = 22 + 0.05x
The first agency's charges will be greater when
... c1 > c2
... 17 + 0.07x > 22 + 0.05x . . . . . . . substitute the above expressions
... 0.02x > 5 . . . . . . . . . . . . . . . . . . . . subtract 17+.05x
... x > 5/0.02
... x > 250
250 miles per day will have to be driven to make the first agency's charges greater.