Initially both the masses and centre of mass are at height H.
If only mass m is dropped (keeping mass M at height H ) it will bring the centre of mass at height less than H
If only mass M is projected upward (keeping mass m at height H ) the centre of mass will shift upward at height more than H
But here are both are projected simultaneouly
Only Mass is responsible to shift centre of mass in the upward direction.
velocity of centre of mass due to mass M
height attained by mass M with this velocity = u2/2g
since m has not reached ground centre of mass would be around the height H due to upward motion of M
therefore total height = H + height gained by M