The equation of a line is written in the form:
y = mx + c
where m = slope and c = y-intercept
So since for your equation slope = - 1, and y-intercept=(0,4)
m = -1 and c = 4 ( c = 4 because if you substitute the point x=0 y=4 into the equation y = mx +c , then , 4 = 0x + c, c = 4 )
So the equation of the line is:
y = -1x + 4 ( and since -1x = -x )
y = -x + 4