$X$ is an exponential random variable with $E[X] = \frac{1}{\lambda}$. $Y$ is an exponential random variable such that $E[Y | X = x] = \frac{1}{x}$. Find $f_{X|Y}(x|y)$.
I first find the joint density, which is I think is $f(x,y) = f_{Y|X}(y|x)\cdot f_X(x)$, meaning $f(x,y) = xe^{-xy} \cdot \lambda e^{-\lambda x}$. Then I would have to find the marginal density of $Y$, which is $\int_{0}^{\infty}f\left(x,y\right)dx$. Then, I would have to divide the joint density by the marginal density of $Y$ to get $f_{X|Y}(x|y)$.
Am I on the right track?
Yes.
We have that $X\sim\mathcal{Exp}(\lambda)~$, $~Y\mid X\sim\mathcal{Exp}(X)~$.
Then
$$\begin{align}f_{\small X}(x)&=\lambda\,\mathrm e^{-\lambda x}\mathbf 1_{0\leqslant x}\\[3ex]f_{\small Y\mid X}(y\mid x)&=x\,\mathrm e^{-xy}\mathbf 1_{0\leqslant y~,~0\leqslant x}\\[3ex]f_{\small Y}(y)&=\int_\Bbb R f_{\small Y\mid X}(y\mid s)\,f_{\small Y}(y)\,\mathrm d s\\[1ex]&=\int_0^\infty s\lambda\,\mathrm e^{-(y+\lambda)s}\,\mathbf 1_{0\leqslant y}\,\mathrm d s\\[1ex]&= \lambda\,(y+\lambda)^{-2}\,\mathbf 1_{0\leqslant y}\\[4ex]f_{\small X\mid Y}(x\mid y) &= \dfrac{f_{\small Y\mid X}(y\mid x)\,f_{\small X}(x)}{f_{\small Y}(y)}\\[1ex]&~~\vdots\end{align}$$