[proofplan]
The probability generating function $G_X(z) = \sum_{k=0}^{\infty} \mathbb{P}(X = k) z^k$ is a power series in $z$. A power series is uniquely determined by its coefficients, and the coefficients of $G_X$ are exactly the probabilities $\mathbb{P}(X = k)$. We recover each probability by differentiating $G_X$ and evaluating at $z = 0$.
[/proofplan]
[step:Express $G_X$ as a power series with coefficients $\mathbb{P}(X = k)$]
Let $X$ be a random variable taking values in $\{0, 1, 2, \ldots\}$. By definition, the probability generating function of $X$ is the [power series](/page/Power%20Series)
\begin{align*}
G_X(z) = \sum_{k=0}^{\infty} \mathbb{P}(X = k) \, z^k.
\end{align*}
This series converges absolutely for all $|z| \le 1$, since $\sum_{k=0}^{\infty} \mathbb{P}(X = k) |z|^k \le \sum_{k=0}^{\infty} \mathbb{P}(X = k) = 1$.
[/step]
[step:Recover each probability by differentiating and evaluating at $z = 0$]
Since $G_X$ is a power series with radius of convergence at least $1$, it is infinitely differentiable on $(-1, 1)$ and its derivatives are obtained by term-by-term differentiation. The $k$-th derivative is
\begin{align*}
G_X^{(k)}(z) = \sum_{j=k}^{\infty} j(j-1)\cdots(j-k+1)\, \mathbb{P}(X = j)\, z^{j-k}.
\end{align*}
Evaluating at $z = 0$, every term with $j > k$ vanishes because it contains a positive power of $z$, leaving only the $j = k$ term:
\begin{align*}
G_X^{(k)}(0) = k!\, \mathbb{P}(X = k).
\end{align*}
Therefore
\begin{align*}
\mathbb{P}(X = k) = \frac{G_X^{(k)}(0)}{k!} \quad \text{for each } k \ge 0.
\end{align*}
[/step]
[step:Conclude that equal PGFs imply equal distributions]
If two random variables $X$ and $Y$ taking values in $\{0, 1, 2, \ldots\}$ satisfy $G_X(z) = G_Y(z)$ for all $z \in [0, 1]$, then equality of the power series forces equality of all coefficients:
\begin{align*}
\mathbb{P}(X = k) = \frac{G_X^{(k)}(0)}{k!} = \frac{G_Y^{(k)}(0)}{k!} = \mathbb{P}(Y = k) \quad \text{for all } k \ge 0.
\end{align*}
Hence $X$ and $Y$ have the same distribution.
[/step]