Momentum is a vector.
Initial momentum of M is zero. So resultant of vector sum of all three momenta of 3 pieces is zero. Let us find the resultant of the momenta of two masses M/4.
Momenta are 3 M/4 and 4M/4 = M. The angle between them is 90⁰.
So θ = 36.87⁰.
So the momentum of the mass M/2 = 1.25 M. Its velocity = 1.25 M / (M/2) = 2.5 m/sec Its direction is 126.87⁰
from direction of M/4 having velocity 3 m/s and
143.13⁰ from the direction of M/4 having velocity 4 m/s