We know that the momentum is conserved this means that:
![p_(1i)+p_(2i)=p_(1f)+p_(2f)](https://img.qammunity.org/2023/formulas/physics/college/bnhbxm68y83imap4rvc5h0yfmipulpcgx1.png)
where
![p=mv](https://img.qammunity.org/2023/formulas/physics/college/zi8qkzyprj0sdsbzw2e0q1luo4qmume13x.png)
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:
![\begin{gathered} (3)(2)-(1)(2)=(3)(0)+1v_(2f) \\ 6-2=v_(2f) \\ v_(2f)=4 \end{gathered}](https://img.qammunity.org/2023/formulas/physics/college/eeb7gsmqq8910d96jm64jp6ade9fblt97f.png)
Therefore the velocity of the 1 kg ball after the collision is 4 m/s