Example  QF.INV.1:   Suppose $f(x) = 2(x-1)^2 -3$. Verify that $g(x) = \sqrt { \frac
      {x+3} 2} + 1$ is the inverse function for $f$..
(i)$(f \circ g)(x) = f(g(x)) =f( \sqrt { \frac
      {x+3} 2} + 1) = 2*(\sqrt { \frac {x+3} 2} + 1 -1) - 3 = (x+3) -3= x$.
(ii)$(g \circ f)(x) = g(f(x)) =g(2(x-1)^2 -3) = \sqrt { \frac {(2(x-1)^2 -3)+3} 2} + 1   = x$.

We check (i) $(f \circ g)(x) = x$. with a graph and a mapping diagram.
Which do you find more convincing visually?