The collision is perfectly inelastic Both of'em will stick together!
Then,
V = velocity of the combined mass.
Therefore,
mv = (M + m)V
V = (m/M+m)v
Impulse imparted to the 1st ball will be
MV = MmV / m+M