To start, we know the basic equation from what us given:

And we want to find m. Fortunately, we have some numbers to plug in to find m. We can make an equation like this

by taking the amount charged and the amount of miles driven to get that charge given in the original problem.
Now we solve.

Now we can put that in our equation to finish it.

And that is the final equation