So,
First, we need to find the slope by subtracting the y-values and subtracting the x-values.
5 - 2 = 3
-1 - 2 = -3
Now divide the y-result by the x-result.
3/-3 = -1 <-- slope
y = -x + b <-- equation so far
To find the y-intercept, substitute a solution into the equation.
2 = -2 + b
Add 2 to both sides.
4 = b
Now we have our complete equation.
y = -x + 4 <-- option D