$\displaystyle x=y^2, y=x-2$

I have the formulas

$\displaystyle

\bar{x}=\frac{1}{A}\int_{a}^b x[f(x)-g(x)]\,dx

$

and

$\displaystyle

\bar{y}=\frac{1}{A}\int_{a}^b \frac{1}{2}[(f(x))^{2}-(g(x))^{2}]\,dx$

I found A= 9/2

Now I do not know how to write $\displaystyle x=y^2$ as f(x) function, since $\displaystyle x=y^2 $would be $\displaystyle f(x) = y = +-\sqrt{x}$

$\displaystyle g(x) = x-2$

Thanks for any help.