In order to be able to write the equation of the line that passes through (-2,-6) and (1, 2), we would need to find first the slope or m.
slope= (y2-y1)/(x2-x1)
If equation of the line passes through (-2,-6) and (1, 2), then:
(-2,-6) and (1, 2)
x1 y1 x2 y2
So, slope=(2+6)/(1+2)
slope=8/3
Equation of the line is y=mx +b
Therefore, by replacing the x with 1 and y with 2 we would be able to calculate it.
y=mx +b
2=8/3*1 + b
2-8/3=b
b=-2/3
Therefore, the equation of the line would be:
y= 8/3x -2/3