Presuming \(e^t (1-p) \lt 1\text{,}\)
\begin{align*}
M(t) & = \sum_{x=1}^{\infty} e^{tx} p (1-p)^{x-1}\\
& = \frac{p}{1-p} \sum_{x=1}^{\infty} (e^t (1-p))^x\\
& = \frac{p}{1-p} \frac{e^t (1-p)}{1 - e^t (1-p)}\\
& = \frac{pe^t }{1 - e^t (1-p)}.
\end{align*}
where we used the geometric series to convert the sum. The second form comes by dividing through by \(e^t\text{.}\)