Equation of a Line in Slope-intercept Form:
y = mx + b
Slope:
m =( y1 - y2) / (x1 - x2)
In this example, slope:
m = (5 - (-5)) / (-2 - (-4))
m = (5 + 5) / (-2 + 4)
m = 10 / 2
m = 5
Y-intercept:
Plug in one of the points (-2, 5), and the slope, in the Slope-intercept Form to find the "intercept":
y = mx + b
5 = 5 (-2) + b
5 = -10 + b
5 + 10 = b
b = 15
Plug in the slope and the intercept to find the Equation of the Line in Slope-intercept Form:
y = 5x + 15