Let m be the total mileages for each company.
Company A.
The total cost for m miles for this company is:
Company B.
The total cost for miles for this company is:
Now, we need to know for what mileage company A charges more than company B, this means:
Solving for m we have:
Therefore for m>140 (that is for more than 140 miles) company A will charge more tan company B.