Explanation:
many greetings to your teacher, but that means you need it in slope-intercept form.
y = f(x) = ax + b
"a" being the slope, "b" being the y-intercept (the y-value when x = 0).
the slope is the ratio
y coordinate difference / x coordinate difference
when going from one point on the line to another. the direction is irrelevant.
it is just important to use the same direction for x and y.
when going from e.g. from (3, 1) to (4, -2) we get
x changes by +1 (from 3 to 4).
y changes by -3 (from 1 to -2).
so, the slope ("a") is -3/+1 = -3.
to get "b" we use one of the given points with the found "a" in the equation and solve for b. I use (3, 1) :
1 = -3×3 + b = -9 + b
10 = b
so, or equation is
f(x) = -3x + 10