Solution:
The equation in slope intercept form is y = mx+b where m is the slope and b is the y intercept
find m, m = (1-(-7)) / ( 2-6 ) = (1+7 )/ (2-6) = 8 / -4 = -2
y = -2x + b, b can be found by substituting one of the points in the equation say point ( 6,-7)
-7 = -2(6) + b , -7 = -12 + b, -7+12 = b, or b=5
The equation is thus y = -2x + 5
Check by substituting the other point instead point ( 2, 1)
1 = -2(2) + b, 1 = -4 + b, b =5 and y = -2x + 5 same as above and checks