Let $X$ be an exponential random variable with $\lambda =5$ and $Y$ a uniformly distributed random variable on $(-3,X)$. Find $\mathbb E(Y)$.
My attempt:
$$\mathbb E(Y)= \mathbb E(\mathbb E(Y|X))$$
$$\mathbb E(Y|X) = \int^{x}_{-3} y \frac{1}{x+3} dy = \frac{x^2+9}{2(x+3)}$$
$$ \mathbb E(\mathbb E(Y|X))= \int^{\infty}_{0} \frac{x^2+9}{2(x+3)} 5 e^{-5x} \, dx$$
You made a mistake in your calculation of $\mathbb E[Y|X]$. The correct calculation is $$ E[Y|X=x] = \frac{1}{x+3}\int_{-3}^x{y dy} = \frac{1}{x+1} \left(\frac{1}{2}y^2\right)\bigg|_{-3}^x = \frac{x^2-9}{2(x+3)} = \frac{x-3}{2}. $$
We then have that $$ \mathbb E[Y] = \int_0^{\infty}\frac{x-3}{2}\cdot 5e^{-5x}dx = \left(\frac{1}{10}e^{-5x}(14-5x)\right)\bigg|_0^{\infty} = -\frac{7}{5}. $$