Let y1 = 10 miles
y2 = 20 miles
x1 = 10.50 dollars
x2 = 18 dollars
x = 27 dollars
And let y be the number of miles that can be traveled with 27 dollars
Now usint 2 point form of line equation.
y- y1 = (y2-y1)/(x2-x1) * (x-x1)
y - 10= (20-10)/(18-10.5) * (27-10.5)
y -10= 22
y = 22+10
y = 32
So you can travel 32 miles with 27 dollars