Let $X$ be a discrete random variable with PMF $\mathbb{P}(X = k) = \frac{1}{8}(7/8)^k$ for $k = 0,1,2,....$.
Use PGF $G(s) = \sum_{k = 0}^\infty s^k\frac{1}{8}(7/8)^k$ find find the mean and variance of $X$.
$G(s)$ is geometric so I get $\displaystyle\frac{1/8}{(1-(7/8)s)}$. Then $\frac{d}{ds}G(s)$ and evaluated at $s=1$ will give us the mean. Which is $\frac{(1/8)(7/8)}{(1-7/8)^2} = \frac{7}{(8-7s)^2}$. Then settign $s = 1$ we get $\mathbb{E}[X] = 7$
Variance is $G''(1) + G'(1) - [G'(1)]^2 = \frac{49}{256(1-7/8)^3}+ \frac{7}{(8-7)^2} - \bigg( \frac{7}{(8-7)^2}\bigg)^2 = 56$
Did I compute these correctly using the PGF?