To solve the problem we use conservation of momentum. The momentum is given by:
before the block exploded the momentum was zero, then we have the conservation expression:
In this case mass one is 8 kg, velocity one is 5 m/s (positive since is moving to the right) and mass two is 12 kg; plugging these values and solving for velocity one we have:
Therefore, the velocity of the second piece is -3.33 m/s which means that its magnitude is 3.33 m/s and it is moving to the left.