You can put this solution on YOUR website! Well if x intercept is 4 then the cordinate is (4,0) since y will be zero at the x intercept
if - 2 is the y intercept then the cordinate will be (0, -2)
so now you have two points. since slope (m) is equal to y2-y1/x2-x1
we can use the cordinates above:
(-2-0)/(0-4) = -2/-4 = 1/2 so now we have the y intercept which is b and the slope which is m
the equation for a line is: y = mx + b
so: y = 1/2(x) -2
hope this helps