find f (g(x))

just replace every x in the definition of f(x) with g(x).