It is correct that the bullet has non zero linear momentum before the collision; because of that, it also has non zero angular momentum with respect to pin point P ( if you chose another reference point the bullet is pointing to, for instance the big mass M at the end of the rod, then the angular momentum would be 0).
With respect to P, the total angular momentum is conserved, so L_initial = L_final.
L_initial = angular momentum of bullet = mv * L
L_final = I * ω, I = inertia of the (mass + bullet) system with respect to P (I = (m+M)L^2)
, ω = angular velocity
By imposing conservation: mvL = (m+M)L^2 * ω, you can solve for ω = 50/11 rad/s ~ 4.5 rad/s
PS Please note that the angular momentum would not be necessarily conserved if you chose one other reference point other than P (for instance, the initial location of the mass M).

Lorenzo B.
12/07/23
Soyeb K.
Oh I see, thank you so much!12/08/23
Soyeb K.
Why is the initial angular momentum for the bullet not zero? Initially it's not rotating about anything though? If the box weren't there it would go straight. very sorry for still not getting it.12/07/23