For each given $p,$ let $Z$ have a binomial distribution with parameters $p$ and $N.$ Suppose that $N$ is itself binomially distributed with parameters $q$ and $M.$ Formulate $Z$ as a random sum and show that $Z$ has a binomial distribution with parameters $pq$ and $M.$
I'm unsure how to formulate $Z$ and show that it has such parameters.
Comments: Not quite finished. Maybe a useful start for you.
A random sum of Bernoulli random variables: Let $Z = \sum_{i=1}^N X_i,$ where $X_i \stackrel{indep}{\sim} \mathsf{Binom}(1, p) \equiv \mathsf{Bernoulli}(p)$ and (independently of the $X_i$) $N\sim \mathsf{Binom}(M, q).$
It is claimed that $Z \sim \mathsf{Binom}(M, pq),$ so that $E(Z) = Mpq$ and $Var(Z) = Mpq(1-pq).$
The usual formulas for a random sum of random variables give: $$E(Z) = E(N)E(X) = (Mq)(p) = Mpq,$$ as required.
Moreover, $$Var(Z) = E(N)Var(X) + Var(N)[E(X)]^2 \\= Mq[p(1-p)] + Mq(1-q)[p^2] = Mpq(1-pq),$$ also as required.
It remains to be shown that $Z$ is binomial with these parameters. I guess that the kind of argument using MGFs in the link in my previous Comment is sufficient to show that.
Incidentally, in a simulation of a million realizations of $Z$ with $M = 10,\,p=.4$ and $p = .6.$ gives the following histogram, where the dots atop hisogram bars are exact values of $Binom(M = 10, pq=.24).$