I will assume that by your "y=1/2x-7" you actually meant y=(1/2)x-7; here (1/2) is the coefficient of x.
The slope of this line can be read off immediately: m = 1/2.
Now insert into the general slope-intercept form y = mx + b the knowns m, x and y:
0 = (1/2)(4) + b. Then b = -2, and y = (1/2)x - 2 is the desired equation of the line.