Q:

Function composition problem

if $f(x)=x-1$ and $(g ∘ f)(x) = x^2 -1$, what's $g(3)$?
I've tried to find the definition of $g(x)$ but there may be an easier way? Thanks.

A:

We have
$$g(3)=g(f(4))=(g\circ f)(4)=15 $$
In fact we even find the general formula for $g$:
$$g(x)=g(f(x+1))=(g\circ f)(x+1)=(x+1)^2-1 $$

