I trust you know about y = mx + b
Realize that when you are given the x or y intercepts, you are really just given two points, in your case the points (4,0) and (0,-2)
So it is easy to find the slope, (-2-0)/(0-4) = 1/2
Take it from there
Determine the point-slope form of the line and the slope-intercept form of the line with x-intercept = 4 and y-intercept = -2