As you can see, in the graph, from 0 to 2, the graph of g(x) is above the graph of f(x), then, in this interval [0,2), g(x) is greater than f(x); for x values above x = 4, g(x) is also above f(x), then g(x) is also greater than f(x) for x values greater than 4.
Then, g(x) > f(x) when 0 < x < 2 and x > 4, option D is the correct answer.