Equation of a line = y = mx +b
m = slope = change in y over the change in x
b = y intercept:
m = (-2 - 7) / (4 - -2) = -9/6 = -3/2
Now you have y = -3/2x + b
Use one of the points, replace y and x and solve for b:
7 = -3/2(-2) + b
Simplify:
7 = 3 + b
Subtract 3 from both sides:
b= 4
The equation is y = -3/2x + 4