So the question asks:
Let $X, Y$ be random variables, with joint probability density function: $$f_{X,Y}(x,y) = \left\{ \begin{array}{ 1 l } 0.25ye^{-y} & \mbox{if $0≤|x|≤y$}\\ 0 & \mbox{ otherwise} \end{array} \right.$$ Find the conditional density $f_{X|Y =y} (x\mid y)$ and identify the conditional distribution $X\mid Y=y$. Use the law of total expectation to find $\Bbb E[X^2]$.
So far I have: \begin{align}f_Y(y) &= \int_{ -y }^{y} 0.25ye^{-y} \,dx =0.5e^{-y}y^2 \\[0.2cm] f _{X|Y=y} (x\mid y) &=\frac{f(x,y)}{f_Y (y)} = 0.25ye^{-y}/0.5e^{-y} y^2 = 0.5/y\end{align}
Normal distribution \begin{align}\Bbb E[X^2] &=\Bbb E[\Bbb E[X^2 \mid Y]]\\[0.2cm]\Bbb E[X^2 \mid Y] &= \int_{-\infty}^{\infty}x^2f_{X \mid Y = y}\text{ d}x\text{.} \\[0.2cm]\Bbb E[\Bbb E[X^2 \mid Y]] &= \int_{0}^{\infty}\left(\int_{-y}^{y}x^2f_{X \mid Y = y}(x)\text{ d}x\right)\text{ d}y = \int_{0}^{\infty}y^2/3 \end{align} which does not converge!
Where am I doing wrong??
You get to $\mathbb{E}[X^2 \mid Y] =\dfrac{y^2}{3}$ successfully
The next stage has to take account of the marginal distribution of $Y$, so gives $\mathbb{E}[X^2] = \displaystyle \int_{y=0}^\infty \left(\dfrac{y^2}{3}\right) 0.5\,y^2\,e^{-y}\, dy$