First you divide the $m+n+p$ things in groups containing $m$ and $n+p$ things respectively in one way. Then you divide the $n+p$ things in the second group into new groups containing $n$ and $p$ things respectively, which you do in all possible ways.
At this point you have found $\frac{(n+p)!}{n!p!}$ ways to subdivide the original $m+n+p$ things.
Next you divide the $m+n+p$ things in groups containing $m$ and $n+p$ things respectively in a different way. Then you divide the $n+p$ things in the second group into new groups containing $n$ and $p$ things respectively, which you do in all possible ways.
At this point you have found another $\frac{(n+p)!}{n!p!}$ ways to subdivide the original $m+n+p$ things.
None of these ways is the same as any of the first $\frac{(n+p)!}{n!p!}$ ways, because the set of $m$ things in the first group is different.
So you have a total of $2\frac{(n+p)!}{n!p!}$ ways to subdivide the original $m+n+p$ things so far.
You continue to repeat the first step, each time using a new way to divide the $m+n+p$ things in groups containing $m$ and $n+p$ things respectively.
You continue this until you run out of ways to divide the $m+n+p$ things in groups.
At the point when you run out of ways to divide the $m+n+p$ things in groups,
you have done the first step $\frac{(m+n+p)!}{m!(n+p)!}$ times,
since that is the number of ways to divide the $m+n+p$ things in groups
of $m$ and $n+p$ respectively.
Each time you did this, you added $\frac{(n+p)!}{n!p!}$ ways to subdivide the original $m+n+p$ things in groups of $m,$ $n,$ and $p$ things respectively.
A sum with $\frac{(m+n+p)!}{m!(n+p)!}$ terms each equal to $\frac{(n+p)!}{n!p!}$ is equal to
$$
\frac{(m+n+p)!}{m!(n+p)!} \times \frac{(n+p)!}{n!p!}.
$$
This is just an example of a more general rule:
if you can do one task $Q$ different ways, and for each way you did the first task you can do a second task $R$ different ways, then the total number of different ways you can do the two tasks together is $Q \times R.$