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

We check both with mapping diagrams and graphs.
Mapping Diagram and Graph of $f\circ g$ :
$f(x) = 3x^2$. $g(x) =  \sqrt{ \frac x 3 }$

Mapping Diagram and Graph of $f \circ g$ :$f(x) = x^2 +2$.
$g(x) = \sqrt{x - 2}$