In my Mathematical Statistics textbook, I have the following discrete probability mass function and associated MGF:
$$p(x) = \frac13\ \left(\frac23\right)^{x-1},\qquad x = 1,2,3,\ldots$$
Then, using the geometric series, the mgf of X is $$ M(t) = E(e^{tX}) = \sum_{x=1}^\infty e^{tx} \frac13\ \left(\frac23\right)^{x-1}$$ $$ = \frac13\ e^t \sum_{x=1}^\infty \left(e^t \frac23\right)^{x-1} $$ $$ = \frac13e^t\left(1-e^t \frac23\right)^{-1}$$
However, I'm unsure of how to get from the initial MGF (on the first line) to the final expression. Any help with this would be greatly appreciated.
Your first line is $$ M(t) = E(e^{tX}) = \sum_{x=1}^\infty e^{tx} \frac13\ \left(\frac23\right)^{x-1}$$
Write $e^{tx} = e^{t+t(x-1)} = e^t e^{t(x-1)}$. Then $e^t$ and the fraction $\frac{1}{3}$ are independent of $x$ and can be taken outside of the summation, giving $$ M(t) = \frac{1}{3}e^t\sum_{x=1}^\infty e^{t(x-1)} \ \left(\frac23\right)^{x-1}$$
Then note that any expression $p^{qr}$ can be rewritten $(p^{q})^r$, hence $e^{t(x-1)}$ can be rewritten $(e^t)^{x-1}$. Then both $e^t$ and $\frac{2}{3}$ are raised to the power of $x-1$, giving your second line
$$ M(t) = \frac13\ e^t \sum_{x=1}^\infty \left(e^t \frac23\right)^{x-1} $$
Then change variables $y=x-1$
$$ M(t) = \frac13\ e^t \sum_{y=0}^\infty \left(e^t \frac23\right)^y $$
Finally apply the infinite geometric series formula $$\sum_{y=0}^\infty r^y = \frac{1}{1-r} = (1-r)^{-1}$$
giving your last line
$$ M(t) = \frac13e^t\left(1-e^t \frac23\right)^{-1}$$