Let center of mass of the system after the point mass has stuck on the rod be Point C.
(m+M)x=2m(0)+m(L2)
⟹x=(mM+m)L2 and BC=(MM+m)L2 ..............(1)
After the collision, the whole system moves with a velocity v′ translationally and rotates about C at an angular velocity w.
For conservation of linear momentum, Pi=Pf
mv+0=(M+m)(v′)⟹v′=mvM+m ...................(2)
ICM=I′C (rod) + I′′C (point mass)
ICM=[112(M)L2+(M)x2]+m(BC)2
ICM=(M+4mM+m)ML212 ................................(3)
Also, angular momentum about B is conserved.
Li=Lf⟹0=ICMw−(M+m)(v′)BC
0=(M+4mM+m)ML212w−(M+m)mvM+m×(MM+m)L2
⟹w=6mvL(M+4m)