$$Y \sim Geometric(P)\\ P \sim \mathcal B(2, 1)$$
I'm trying to compute $E[Y]$ without finding marginal distribution of $Y$. I need some hints here. I also need to find the pmf of $Y$. My approach is as follows:
Integrate from 0, 1 over $p: f(p)(1-f(p))^{(y-1)}$ where $f(p)$ is the pdf of $\mathcal B(a, b)$. This leads to some messy algebra. Am I on the right track?