Let m = miles
let c = cost
Create a system of equations.
taxi company 1: c = $1.20m + $2
taxi company 2 c = $1.40m + $1
Set both equations equal to each other to solve for variable m.
$1.20m + $2 = $1.40m + $1
Subtract $1.20 from both sides and Subtract $1 from both sides.
$1 = $0.20m.
Divide each side by $0.20.
5 = m.
Plug 5 into one of our original equations for m.
c = $1.20(5) + $2.
Simplify the right side of the equation
c = $8
In conclusion, c = $8 and m = 5