TeX source:
\begin{aligned} v_{2}^{\prime} &=\frac{m_{1} v_{1}+m_{2} v_{2}-m_{1} v_{1}^{\prime}}{m_{2}} \\ &=\frac{(0.350 \mathrm{~kg})(2.00 \mathrm{~m} / \mathrm{s})+(0.500 \mathrm{~kg})(-0.500 \mathrm{~m} / \mathrm{s})}{0.500 \mathrm{~kg}}-\frac{(0.350 \mathrm{~kg})(-4.00 \mathrm{~m} / \mathrm{s})}{0.500 \mathrm{~kg}} \\ &=3.70 \mathrm{~m} / \mathrm{s} \end{aligned}