A linear function g(x) is often written in slope-intercept form: y = mx + b. In this format, the y value is equivalent to g(x), m is the slope, and b is the y-intercept.
Some notes on format and substitutions to start:
g(x) = y
g(0) = b = y-intercept
m = slope = (y2-y1)/(x2-x1) for two points (x1,y1) and (x2,y2)
The y-intercept is the y-coordinate for x = 0. We already know g(0) = 9, so for x = 0, y = 9. Therefore, the y-intercept is 9, so b is 9.
Our updated linear function is y = mx + 9. So now, we need to find the slope.
Two points we have are (0,9) and (8,7). For two points, their slope is the difference in y values divided by the difference in x values, so we have m = (7-9)/(8-0) = (-2)/8 = -1/4. Now we have the slope.
Putting it all together, we have the answer: y = (-1/4)x + 9