Let $\{ Y_j: 1\leq j \leq K \}$ be a collection of i.i.d. random variables. Suppose we have two random variables $W$ and $W'$ that have the same distribution function, where $W'$ is given by: $$W'=\sum_{j=1}^{K} Y_j,$$ where $K$ is a random number. Then:
$M_W(s)=G_K(M_Y(s))$, where $M_Y$ is the moment generating function of $Y$.
Since $W$ and $W'$ have the same distribution, they have the same moment generating function: $$M_W(s)=M_{W'}(s).$$
By definition of the probability generating function, the RHS is given by: $$G_K(M_Y(s))=\mathbb{E}[(M_Y(s))^K]=\mathbb{E}[(\mathbb{E}[e^{Ys}])^K].$$ To compute the LHS, I condition on $K$:
$$M_{W'}(s)=\mathbb{E}[e^{W' s}]=\mathbb{E}[\mathbb{E}[e^{W' s} \vert K]]=\mathbb{E}[\mathbb{E}[e^{s\sum_{j=1}^{K}Y_j } \vert K]]=\mathbb{E}[\mathbb{E}[e^{sY_1s+...Y_Ks} \vert K]]=\mathbb{E}[\mathbb{E}[e^{Y_1s}\vert K]...\mathbb{E}[e^{Y_Ks}\vert K] ]=\mathbb{E}[\mathbb{E}[e^{Ys}\vert K]^K ].$$
So is $\mathbb{E}[(\mathbb{E}[e^{Ys}])^K]=\mathbb{E}[\mathbb{E}[e^{Ys}\vert K]^K ]$?