Take the numbers 0 to 5 as x values so the other data are y values. The slope is diff-y/diff-x and it's a constant 1.8. So we have y (cost)=1.8x (miles)+ b where b has to be found. When miles=0, cost=2, so b=2 and y=1.8x+2. To check, let's put x=5, then y=11. The form of the equation isn't important, because, unless you are asked for it, any representation will demonstrate the relationship between cost and miles.