For this problem, we know that the line's function is equal to 3 if X isn't 0. That means that for every X that isn't 0, we'll have a line at y = 3 (since we know that g(x) is just fancy for y!). We're also given that if X is equal to 0, it must be at y = 4.
Therefore, your graph should have a straight line through y = 3 EXCEPT at x = 0! At x = 0 you should just have a shaded dot at y = 4.