May be, I am over thinking this problem. Over here, do we just construct a piece wise function $f$ such that is $g(x)/x$ for all $x \neq 0$ and it is equal to $0$ for $x=0$?
I was a little thrown off by the question. I just didn't see a rigorous enough way to do it. Any help will be appreciated.