We know that the momentum is conserved this means that:

where

In this case the balls are moving opposite each other this means that the velocities have opposite sign, we also know that the 3 kg ball stops after the collision this means that it final velocity is zero, then we have:

Therefore the velocity of the 1 kg ball after the collision is 4 m/s