You can put this solution on YOUR website! I think you might have missed something here.
If g(x) = -7+2 you don't have a function of x at all. What you have is a constant so you can't answer the problem.
Please take another careful look at the original problem.