Paragraph

\begin{equation*} M(0) = p \frac{e^0 }{1 - e^0 (1-p)} = \frac{p}{1-(1-p)} = 1. \end{equation*}
Using the second form for M(t),
\begin{equation*} M'(t) = \frac{e^{-t} p}{(e^{-t} - (1-p))^2} \end{equation*}
and therefore
\begin{equation*} M'(0) = \frac{p}{(1-(1-p))^2} = \frac{1}{p}. \end{equation*}
Continuing with the second derivative,
\begin{equation*} M''(t) = -\frac{p e^{-t} }{{\left(p + e^{-t} - 1\right)}^2} + \frac{2 p e^{-2t}}{{\left(p + e^{-t} - 1 \right)}^{3}} \end{equation*}
and therefore
\begin{equation*} M''(0) = -\frac{p}{{\left(p + 1 - 1 \right)}^2} + \frac{2 p}{{\left(p + 1 - 1 \right)}^{3}} = -\frac{1}{p} + \frac{2}{p^2} = \frac{1}{p^2} + \frac{1-p}{p^2} \end{equation*}
which is the squared mean plus the variance for the geometric distribution.
in-context