Let $N$ denote the total number of tossing coins, $X$ denote the total number of heads, and $Y$ denote the total number of tails. Then we have $X \sim B(N, p), 0 < p < 1, q = 1-p$ and $N = X + Y$.
The moment generating function of $X$ is
\begin{equation}
\begin{aligned}
G_{X}(s) &= E(s^{X}) \\
&= E \{ E (s^{X} \mid N)\} \\
&= E \left[\sum_{x=0}^{N} \left\{s^{x} \binom{N}{x} p^{x} (1-p)^{N-x} \right\}\right] \\
&= E \left[\sum_{x=0}^{N} \left\{\binom{N}{x} (ps)^{x} (1-p)^{N-x} \right\}\right] \\
&= E \{ (ps + 1-p)^{N}\} \\
&= E \{ (ps + q)^{N}\} = G_{N}(ps + q). \qquad (1)
\end{aligned}
\end{equation}
By symmetry of $X$ and $Y$, we have
\begin{equation}
G_{Y}(t) = G_{N}(p + qt). \qquad (2)
\end{equation}
We want to leverage the independence between $X$ and $Y$. By using the moment generating function, this is equivalent to $E(s^{X}t^{Y}) = E(s^{X})E(t^{Y})$.
Thus we transform $E(s^{X}t^{Y})$ as follows.
\begin{equation}
\begin{aligned}
E(s^{X}t^{Y}) &= E(s^{X}t^{N-X}) \\
&= E\left\{\left(\frac{s}{t}\right)^{X}t^{N}\right\} \\
&= E \left[ E \left\{\left(\frac{s}{t}\right)^{X}t^{N} \mid N\right\} \right]\\
&= E \left[t^{N} E \left\{\left(\frac{s}{t}\right)^{X} \mid N\right\} \right]\\
&= E \left\{t^{N} \left[\sum_{x=0}^{N}\left\{\left(\frac{s}{t}\right)^{x}\binom{N}{x}p^{x}(1-p)^{N-x} \right\} \right]\right\}\\
&= E \left\{t^{N} \left[\sum_{x=0}^{N}\left\{\binom{N}{x}\left(\frac{ps}{t}\right)^{x} (1-p)^{N-x} \right\} \right]\right\}\\
&= E \left[t^{N} \left\{\left(\frac{ps}{t}\right) + 1-p \right\}^{N} \right]\\
&= E \left[t^{N} \left\{\left(\frac{ps}{t}\right) + q \right\}^{N} \right]\\
&= E \left[\left(ps + qt \right)^{N} \right]\\
&= G_{N}(ps + qt). \qquad (3)
\end{aligned}
\end{equation}
Combining (1) (2) (3), we get the following equality:
\begin{equation}
G_{N}(ps + qt) = G_{N}(ps + q)G_{N}(p + qt).
\end{equation}
Let $H(s) = G_{N}(1-s)$, and we get
\begin{equation}\nonumber
H(1 - ps - qt) = H(1 - ps - q)H(1 - p - qt).
\end{equation}
That is,
\begin{equation}
H\{p(1-s) + q(1-t)\} = H\{p(1-s)\}H\{q(1-t)\}.
\end{equation}
Since all continuous solutions of the equation $f(x+y) = f(x)f(y)$ take the form $f(x) = e^{\lambda x}$ for some $\lambda$, we have $H(s) = e^{\lambda s}$ for some $\lambda$. Therefore, $G_{N}(s) = H(1-s) = e^{\lambda (1-s)}$ for some $\lambda$.
Note that the moment generating function of $N$ coincides with the moment generating function of Poisson distribution with parameter $-\lambda$, which finishes the proof.