In order to solve this problem we have to remember that the equation of any line takes the form

Therefore,

In other words, multiplying k by x is just multiplying the slope m by a factor of k.
The slope of g(x) is

and the slope of f(x) is

We see than the slope of g(x) is 2 times the slope of f(x); therefore, k = 2 which is choice D.