This is an example of function composition. Being g and f well defined for the purpose of the composition and x in the domain of f, the composition is:
We can apply this definition to our problem.
Notice that, first, f(x) is calculated and then we used the result (let's called it y) and evaluate it using g (this is g(y))
So, regarding our problem
Then