How can I calculate this generating function? Let $X$ be a Poisson random variable with parameter $Y$, where $Y$ is itself a Poisson random variable with parameter $\mu$. Show that the generating function of $X+Y$ is 
$$G_{X+Y}(x)\triangleq\mathbb{E}[x^{X+Y}]=\exp\bigl(\mu(x e^{x-1}-1)\bigr).$$
My attempt:
$G_{X+Y}(x)\triangleq\mathbb{E}[x^{X+Y}]=\mathbb{E}[e^{tX}e^{tY}]$ where $t=\ln x$. This is like:
$$\mathbb{E}[g_t(X)g_t(Y)]$$ 
where $g_t(Z) = e^{tZ}$
which I I do not know how to calculate when $X$ aand $Y$ are dependent.
I know that $\mathbb{E}[g(X)]=\sum_k e^{tk}Y^ke^{-Y}/k!$
 A: I am going to use $z$ instead of $x$ as the independent variable of $G_{X+Y}(z)$ in order to avoid confusion. By the total expectation theorem,
\begin{equation}
G_{X+Y}(z) = E\left[z^{X+Y}\right] = \sum_{y=0}^{\infty}E\left[z^{X+Y}\mid Y=y \right]P(Y=y)
\tag{1}
\end{equation}
The conditional expectation is computed as follows,
\begin{equation}
E\left[z^{X+Y}\mid Y=y \right] = \sum_{x=0}^\infty z^{x+y}p_{x\mid y}(x\mid y)
\tag{2}
\end{equation}
where $\displaystyle p_{x\mid y}(x\mid y) =\frac{y^xe^{-y}}{x!}$ is the conditional PMF of $X$ given $Y=y$. Therefore,
\begin{align}
E\left[z^{X+Y}\mid Y=y \right] &= z^y\sum_{x=0}^\infty z^x\frac{y^xe^{-y}}{x!}\\
&= z^ye^{-y}\sum_{x=0}^\infty \frac{(zy)^x}{x!}\\
&= z^ye^{-y}e^{zy}\\
&= (ze^{z-1})^y \tag{3}
\end{align}
where the Taylor's series of the exponential was used in the third equality. By other hand,
\begin{equation}
P(Y=y) = \frac{\mu^ye^{-\mu}}{y!}
\tag{4}
\end{equation}
Using (3) and (4) in (1), we get
\begin{align}
G_{X+Y}(z) &= \sum_{y=0}^{\infty}(ze^{z-1})^y\frac{\mu^ye^{-\mu}}{y!}\\
&= e^{-\mu}\sum_{y=0}^{\infty}\frac{(ze^{z-1}\mu)^y}{y!}\\
&= \text{exp}(-\mu)\text{exp}(ze^{z-1}\mu)\\
&= \text{exp}[\mu(ze^{z-1}-1)]
\end{align}
where again the Taylor's series of the exponential was used in the third equality.
