# Solve system $m_av_a^2=m_a(v_a')^2+m_b(v_b')^2; m_av_a=m_av_a'+m_bv_b'$

I'm doing a physics problem and I'm stuck on something that should be easy by now but yet I can't figure out how to solve this neatly. I've tried completing the square and the quadratic formula but the results get really ugly.

\begin{align}m_av_a^2&=m_a(v_a')^2+m_b(v_b')^2\\ m_av_a&=m_av_a'+m_bv_b'\end{align}

The two unknowns are $$v_a'$$ and $$v_b'$$ but I only need $$v_b'$$. According to the notes the answer should be

$$v_b'=\frac{2m_av_a}{m_a+m_b}.$$

I don't see how $$v_a'$$ vanishes here. The answer I got was

$$v'_b=\sqrt{\frac{m_a}{m_b}(v_av_a'-(v_a')^2)-\frac{v_a^2}{4}}+\frac{v_a}{2}.$$

Any help is welcome.

From the second equation we get $$v_a-\frac{m_b}{m_a}v_b'=v_a'$$
Plugging this in the first equation we get $$m_av_a^2=$$ $$m_a\left(v_a-\frac{m_b}{m_a}v_b'\right )^2+m_bv_b'^2$$ Simplifying we get $$0=\frac{m_b^2}{m_a}v_b'^2-2m_bv_b'v_a+m_bv_b'^2$$ we get $$v_b'=\frac{2m_am_bv_a}{m_b^2+m_am_b}$$