If you have two points and want to find the equation for the line, you use the two-point form equation.
The formula is [tex]y - y_1 = \frac{y_2 - y_1}{x_2 - x_1}(x - x_1)[/tex]
Well, make the x-intercept the point [tex](x_1, y_1)[/tex] and the y-intercept the point [tex](x_2, y_2)[/tex]
Plug in the values.
[tex]y - 0 = \frac{4 - 0}{0 - (-2)}(x - (-2))[/tex]
Simplify.
[tex]y - 0 = \frac{4 - 0}{0 - (-2)}(x - (-2))[/tex]
[tex]y - 0 = \frac{4}{2}(x - (-2))[/tex]
[tex]y - 0 = 2(x - (-2))[/tex]
[tex]y - 0 = 2(x + 2))[/tex]
[tex]y - 0 = 2x + 4[/tex]
[tex]y = 2x + 4[/tex]