For this question we are translating the function over the x-axis and the y-axis. To do that we just need to follow some rules as follows:
So if we need to move up a function we ad a value to it and if wee need to move down we subtract.
Now for horizontal translation we have:
Once we already know how to translate up and down, left and right we can calculate g(x) as follows:
And that is our final answer.