Momentum of first part $$ = 1 \times 12 = 12\,kg\,m{s^{ - 1}}$$
Momentum of the second part $$ = 2 \times 8 = 16\,kg\,m{s^{ - 1}}$$
∴ Resultant momentum $$ = \sqrt {{{\left( {12} \right)}^2} + {{\left( {16} \right)}^2}} $$
$$ = 20\,kg\,m{s^{ - 1}}$$
The third part should also have the same momentum.
Let the mass of the third part be $$M,$$ then
$$\eqalign{
& 4 \times M = 20 \cr
& M = 5\,kg \cr} $$
Alternative

$$\eqalign{
& Mv\cos \theta = 12\,......\left( {\text{i}} \right) \cr
& Mv\sin \theta = 16\,......\left( {{\text{ii}}} \right) \cr} $$
Dividing Eqs. (ii) and (i), we get
$$\tan \theta = \frac{{16}}{{12}} = \frac{4}{3}$$
$$M = \frac{{12 \times 5}}{{4 \times 3}} = \frac{{60}}{{12}} = 5\,kg$$