(b) If $v$ is common velocity of the block and movable wedge, then applying the principle o conservation of linear momentum we get,
$mu + 0 = (m + nm)v$
$v = \frac{mu}{m(1 + n)} = \frac{u}{1 + n}$
This infact, can be taken as velocity of centre of mass of the block and wedge
$ie,\ v_{CM} = v = \frac{u}{1 + n}$
Applying the principle of conservation of energy
$\frac{1}{2}mu^{2} = mgh + \frac{1}{2}m(1 + n)\frac{u^{2}}{(1 + n)^{2}}$
or $u^{2} = 2gh + \frac{u^{2}}{1 + n}$
$u = \sqrt{2gh\left( 1 + \frac{1}{n} \right)}$