So this isn't a answer:
This is to help you understand how to do it in the future.
So we are going to let HOW MANY MILES GO BY be represented as (m)
Company A
60 + (m + .20) = final cost
Company B
20 + (m + .60) = final cost
Now you have to plug in numbers till you get your total miles left.
Have a good Day!!