f(x) = g(x + 2) Definition
g(x) = x^2 + 3 Given
g(x + 2) = (x + 2)^2 + 3 Substitute in g(x) ; make x into x + 2.
f(x) = x^2 + 4x + 4 + 3 expand
f(x) = x^3 + 4x + 7 Collect like terms
The answer is either
f(x) = (x + 2)^2 + 3 or
f(x) = (x^2 + 4x + 7)
Without choices, it's hard to tell which one it is.
Try the second one first.