Hey there! I'm happy to help!
Let's represent the number of miles traveled with the variable m.
We see that it will cost $2 for every mile, so for if we drive 8 miles, it will cost $16, 9 will be $18, and so forth. So the relationship is that the cost will be double the money, so what we have here is 2×m. In algebra, you can simply write variable multiplication as just putting the numbers next to each other, so 2m will be that part of the equation.
We see that the initial cost of the taxi is $3.
3
We are going to be adding our $2 per mile to this amount (2m).
3+2m
And we will add our $1 tip.
3+2m+1
And this is equal to $20.
3+2m+1=20
We can combine the 3 and the 1 to give us 4.
4+2m=20
So, we see that 2m+4 is equal to 20. If we subtract that four from 20, we will see that 2m is equal to 16.
We remember that our cost from mileage is double the miles, so if 16 is double something, we just divide by two!
16/2=8
So, this means that we traveled 8 miles!
Have a wonderful day and keep on learning! :D