Let $X$ be a random variable such that $X\sim Poi(λ)$ and $Y_i\sim Poi(μ)$ independently. $Y = \sum\limits_{i=1}^{X}Y_i$. Let $Z = X + \sum\limits_{i=1}^{X}Y_i$ be the total number of people. Find $Var(Z)$.
$$Var(Z) = Var(X) + Var(Y) + 2Cov(X,Y) = Var(X) + Var(Y) + 2[E[X]E[Y]-E[XY]]$$
$Var(X) = \lambda, E[X] = \lambda, E[X^2] = \lambda^2+ \lambda$ and $E[XY] = \mu[ \lambda^2+ \lambda]$.
How do I find $Var(Y)$?
The answer should be $Var(Z) = \lambda(1+3\mu+\mu^2)$.
Use the law of total variance i.e. $$ \text{Var(Z)}=E(\text{Var}(Z\mid X))+\text{Var}(E(Z\mid X))\tag{0}. $$ First note that $$ E(Z\mid X)=E(X\mid X)+E\left(\sum_{i=1}^XY_i\mid X\right)=X+X\mu=X(1+\mu)\tag{1} $$ since $$ E\left(\sum_{i=1}^XY_i\mid X=x\right)=E\left(\sum_{i=1}^xY_i\mid X=x\right)=x\mu $$ for each value of $x\in\mathbb{N}$ where we used independence of the $Y_i$ from $X$ in the final step.
Hence $$ \text{Var}(E(Z\mid X))=(1+\mu)^2\text{Var}(X)=(1+\mu)^2\lambda.\tag{2} $$ Next we note that $$ \text{Var}(Z\mid X)=X\mu\tag{3} $$ since $$ \text{Var}(X+\sum_{i=1}^XY_i\mid X=x)=\text{Var}(x+\sum_{i=1}^xY_i\mid X=x)=\text{Var}(\sum_{i=1}^xY_i)=x\mu $$ where we use independence in the second last inequality. Hence $$ E(\text{Var}(Z\mid X))=\mu\lambda\tag{4} $$ Combining $(0)$, $(2)$, and $(4)$ we get that $$ \text{Var}(Z)=\mu \lambda+(1+\mu)^2\lambda=\lambda(1+3\mu+\mu^2) $$ as desired.