Answer
See explanation
Work Step by Step
$\underline{\text{For}\ E(X):}$
This is similar to that in Example 3.12.5 on p. 210.
$\begin{align*}
M_X(t) &= \frac{pe^t}{1-(1-p)e^t} \\
M_X^{(1)}(t) &= \frac{d}{dt}\left(\frac{pe^t}{1-(1-p)e^t}\right) \\
&= \frac{(1-(1-p)e^t)\frac{d}{dt}(pe^t) - pe^t \frac{d}{dt}(1-(1-p)e^t)}{(1-(1-p)e^t)^2} & \text{[ Quotient Rule]}\\
&= \frac{(1-(1-p)e^t)pe^t - pe^t(-(1-p)e^t}{(1-(1-p)e^t)^2} \\
&= \frac{pe^t - (1-p)pe^{2t} + p(1-p)e^{2t}}{(1-(1-p)e^t)^2} \\
M_X^{(1)}(t) &= \frac{pe^t}{(1-(1-p)e^t)^2} & \text{(Eq. 1)}\\
M_X^{(1)}(0) &= \frac{pe^0}{(1-(1-p)e^0)^2} \\
E(X) &= \frac{p}{(1-(1-p))^2} \\
&= \frac{p}{p^2} \\
\color{blue}{E(X)}\ &\color{blue}{= \frac{1}{p}}
\end{align*}$
$\underline{\text{For}\ Var(X):}$
Since $Var(X) = E(X^2) - E(X)$, we yet need to solve for $E(X^2)$ and we do so using Eq. 1 above.
$\begin{align*}
M_X^{(2)}(t) &= \frac{d}{dt}M_X^{(1)}(t) \\
&= \frac{d}{dt}\left(\frac{pe^t}{(1-(1-p)e^t)^2}\right) & \text{[ see Eq. 1 ]}\\
&= \frac{(1-(1-p)e^t)^2\dfrac{d}{dt}(pe^t) - (pe^t)\dfrac{d}{dt}(1-(1-p)e^t)^2}{(1-(1-p)e^t)^4} & \text{[ Quotient Rule ]}\\
&= \frac{(1-(1-p)e^t)^2pe^t - (pe^t)(2)(1-(1-p)e^t)(-(1-p)e^t)}{(1-(1-p)e^t)^4} \\
&= \frac{(1-(1-p)e^t)^2pe^t + (pe^t)(2)(pe^t)(1-p)e^t}{(1-(1-p)e^t)^4} \\
&= \frac{(1-(1-p)e^t)^2pe^t + 2p^2(1-p)e^{3t}}{(1-(1-p)e^t)^4} \\
M_X^{(2)}(t) &= \frac{pe^t((1-(1-p)e^t)^2 + 2p(1-p)e^{2t})}{(1-(1-p)e^t)^4} \\
M_X^{(2)}(0) &= \frac{pe^0((1-(1-p)e^0)^2 + 2p(1-p)e^{2(0)})}{(1-(1-p)e^0)^4} \\
E(X^2) &= \frac{p((1-(1-p))^2 + 2p(1-p))}{(1-(1-p))^4} \\
&= \frac{p((p)^2+ (2p-2p^2))}{p^4} \\
&= \frac{p(2p-p^2)}{p^4} \\
&= \frac{p^2(2-p)}{p^4} \\
E(X^2) &= \frac{2-p}{p^2} & \text{(Eq. 2)}
\end{align*}$
Thus, using Eq. 2 and since $E(X) = \dfrac{1}{p}$,
$\begin{align*}
Var(X) &= E(X^2) - E(X)^2 \\
&= \dfrac{2-p}{p} - \left(\frac{1}{p}\right)^2 \\
&= \dfrac{2-p-1}{p^2} \\
\color{blue}{Var(X)}\ &\color{blue}{= \frac{1-p}{p^2}}
\end{align*}$