Question 941952
Identify the ordered pairs of price and gallons sold, (p,g).  The two points are (2.71,2216) and (2.51,2296).  You want to find the equation of the line with those two points, and that will define the function S(p).  This task should be clear.


Using point-slope form,  {{{S(p)-2296=((2296-2216)/(2.51-2.71))(p-2.51)}}}, and simplify and  solve for S(p).




___
Your professor had maybe used a different example, but the concept and skills would be the same.  Your description specified the function S(p) to correspond the the vertical axis, and the p, price, to correspond with the horizontal axis.  Usually, x is for the horizontal axis and y is the vertical axis; but they could be reversed, depending on which way you want to choose the function.  Your example here is an application of Amount of Gallons Sold to depend on Price.