I am unsure of a particular step in the supplied solution of this problem.
Problem:
We are given $X_{i}$, for i = 1,..., n, is a sequence of iid Geometric Random Variables.
N ~ Geometric(p), and N is independent of all the $X_{i}$'s
$S_{N} = \sum^{N}_{i=1}Xi$.
What is the MGF of $S_{N}$?
My working:
Let $Y = S_{N}$
Know that $M_{X}(t) = \frac{pe^{t}}{1-qe^{t}}$ (from an earlier part of this problem). So the conditional MGF of the random sum is $M_{Y|N}(t|N) = [M_{X}(t)]^{N} = [\frac{pe^{t}}{1-qe^{t}}]^{N}$
Next, MGF of Y, $M_{Y}(t) = E[M_{Y|N}(t|N)] = E[(\frac{pe^{t}}{1-qe^{t}})^{N}]$
I am able to show up till this part, so everything above is fine. The next step is to perform this:
$E[(\frac{pe^{t}}{1-qe^{t}})^{N}] = \frac{p.\frac{pe^{t}}{1-qe^{t}}}{1-q.\frac{pe^{t}}{1-qe^{t}}} $
I don't understand why the expression for the denominator takes that form if we are bringing it up by power of N. Can someone kindly explain the reasoning for it please?
For $N\sim\text{Geometric}(p)$, we wish to compute $\mathbb E[\gamma^N]$ for $\gamma:=\frac{pe^t}{1-qe^t}$. Now, since $\left|p\frac{qe^t}{1-qe^t}\right|$$<1$ for $t<-\log (q(1+p))$, observe that the infinite sum of a geometric series justifies
$$\mathbb E[\gamma^N]=\sum\limits_{j=1}^{\infty}\gamma^j(1-p)^{j-1}p=\frac{p}{1-p}\sum\limits_{j=1}^{\infty}(\gamma(1-p))^j=\frac{p}{1-p}\frac{\gamma(1-p)}{1-\gamma(1-p)} = \frac{p\gamma}{1-q\gamma}.$$
That is,