The actual question doesn't ask for g(x) or f(x), only their difference k. We count squares, say on the y axis, and get k=5, i.e. g(x)=f(x)+5.
If we really want to know the equations of each line, we see the slope is 1/3 and f and g have respective y intercepts -2 and 3. So
[tex]f(x) = \frac 1 3 x - 2
[/tex]
[tex]g(x) = \frac 1 3 x +3
[/tex]
[tex]k = g(x)-f(x) = 5[/tex]