Problem: Let the joint density function of $(X,Y)$ be
$$f_{X,Y}(x,y)=\begin{cases}\dfrac{1}{y}e^{-x/y}e^{-y}&\text{if }x\in(0,\infty)\text{ and }y\in(0,\infty)\\[0.3em]0&\text{otherwise.}\end{cases}$$
(a) Find $f_Y(y)$ and $f_{X|Y}(x|y)$. Compute $E[Y].$
Attempt: We have for $y\in(0,\infty)$ that
$$f_Y(y)=\int_{0}^\infty f_{X,Y}(x,y)\,dx=\int_0^\infty\frac{1}{y}e^{-x/y}e^{-y}\,dx=e^{-y},$$
and $f_y(y)=0$ otherwise. Then for all $x\in(0,\infty)$ and $y\in(0,\infty)$ we have
$$f_{X|Y}(x|y)=\frac{f_{X,Y}(x,y)}{f_Y(y)}=\frac{1}{y}e^{-x/y}.$$
Finally, since $Y\thicksim\text{Exp}(1),$ we have that $E[Y]=1$.
(b) Find the conditional expectation $E[X|Y].$
Attempt: We have
$$E[X|Y=y]=\int_0^\infty xf_{X|Y}(x|y)\,dx=\int_0^\infty \frac{x}{y}e^{-x/y}\,dx=y,$$
which implies that $E[X|Y]=Y.$
(c) Use (a) and (b) to find $E[X].$
Attempt: We have that
$$E[X]=\int_0^\infty E[X|Y=y]f_Y(y)\,dy=\int_0^\infty yf_Y(y)\,dy=E[Y]=1.$$
Could anyone help me check if my approach is correct?
Thank you for your time and appreciate any feedback.
Everything is correct. By the way, you can see from the density of $X|Y$ that $X|Y \sim \mathrm{Exp}(\mathtt{mean}=y) \therefore \mathsf{E}[X|Y=y] = y \ $ without having to do the integral. But anyway, everything looks good.