First, find the slope: m = Δy/Δx = (2-4)/(4-0) = -0.5
The "intercept" in the slope-intercept form of a line is the y-intercept. And at the y-intercept, x = 0. Conveniently, one of our points has an x = 0, i.e., the point (0,4). So, our equation would be y = -0.5x + 4.
If you wanted to double-check, you could use the point (4,2) to find the point-slope equation of the line and see if it matches up with the slope-intercept form above. Given a slope of -0.5 and a point (4,2), our point-slope equation would be y - 2 = -0.5(x - 4). If we expand this, we get y - 2 = -0.5x + 2. Solving for y, we obtain y = -0.5x + 4.
Thus, y = -0.5x + 4 would be our equation.