I got this transformation problem here:

\(\displaystyle \text{let} \ f(x)=\frac{2}{5}|x|, \text{if} \ -1<x<2, \text{be the pdf of a continuous random variable} \ X\). \(\displaystyle \text{find the pdf of } Y=X^2\).

The solution starts by mentioning that \(\displaystyle g(x)=x^2\) is a two-to-one transformation. I'm a bit lost here, both \(\displaystyle f(x) \) and \(\displaystyle g(x)\) are two to one? What do we do??... The answer says:

\(\displaystyle h(y)= \frac{2}{5}, 0<y<1\) and \(\displaystyle h(y)=\frac{1}{5}, 1<y<4\).

Any help is appreciated