The slope-intercept form:
[tex]y=mx+b[/tex]
m - slope
b - y-intercept → (0, b)
We have the points (-4, -6) and (2, 6). Substitute:
[tex]m=\dfrac{6-(-6)}{2-(-4)}=\dfrac{12}{6}=2\\\\y=2x+b[/tex]
Put the coordinates of the point (2, 6) to the equation of a line:
[tex]6=2(2)+b\\\\6=4+b\qquad|-4\\\\2=b\to b=2[/tex]