Since the price of the coffee itself is $1.25, the gradient of the function will be 1.25 and will give a straight line. However, since the first cup of coffee costs $3, when extrapolated to x = 0, the price is 3 - 1.25 = $1.75 which indicates the cost of using the cup. Therefore this is the y-intercept. This can be expressed as a linear function of y = mx + c where y is the price, m is the gradient, x is the number of times the cup has been filled with coffee, and c is the price of using the cup, giving:
y = 1.25x + 1.75