Let's break it down. You spent $20. Plus the $1 tip. 20 - 1 = 19 $19 is how much you spent without the tip The cost for the taxi ride itself is $3 19 - 3 = 16 $16 is how much you spent without the ride cost + tip You spent $2 for every mile traveled. 16/2=8