First you would need to find the slope between those two points
-10-(-2) = -10+2 = -8 = -1 which is the m in the formula
1-(-7) 1+7 8
So the equation is now
y= -1x+b
Chose one of the points and plug the the x and y values into the formula to derive the b value
I will use the point (1, -10) where x=1 and y=-10
into the equation y= -1x + b substitute those x and y values
-10 = -1(1) + b
-10 = -1 + b
add 1 to both sides
-9 = b
Put this value into the equation and now you have the final equation in y=mx+b form
y = -1x -9
We usually do not show a 1 before a variable so the final answer should be:
y = -x -9