If it’s horizontally translated, the x value/ input is altered, meaning that the value is added or subtracted from x. In this case, you move 4 units to the right, so you’d have (x-4)^2. Then vertical change is shown by changes to the y value, so it would be outside the parentheses. So you get +9 out of the parentheses.
g(x)=(x-4)^2+9