-----------------------------------------------------
Amount of gas (gallons)
18
12
8
Number of miles driven
90
360
540
-----------------------------------------------------
x, miles driven y, amount of gasoline in tank
90 18
360 12
540 8
Checking slopes
and
Picking first point in the list
or if you want name of function to be M, then .