Also, for the kinetic energy conserved in elastic collision, you get:
\(\begin{array}{l}\frac{1}{2}mv_{\rm{A}}^2 + \frac{1}{2}mv_{\rm{B}}^2 = \frac{1}{2}m{\left( {{{v'}_{\rm{A}}}} \right)^2} + \frac{1}{2}m{\left( {{{v'}_{\rm{B}}}} \right)^2}\\v_{\rm{A}}^2 + v_{\rm{B}}^2 = {\left( {{{v'}_{\rm{A}}}} \right)^2} + {\left( {{{v'}_{\rm{B}}}} \right)^2}\end{array}\)
Now, after further calculation of the above equation using the values from the previous equations, you get:
\(\begin{array}{c}{\left( {{{v'}_{{\rm{Ay}}}} + {{v'}_{\rm{B}}}} \right)^2} + {\left( {{{v'}_{{\rm{Ax}}}}} \right)^2} = {\left( {{{v'}_{\rm{A}}}} \right)^2} + {\left( {{{v'}_{\rm{B}}}} \right)^2}\\{\left( {{{v'}_{{\rm{Ax}}}}} \right)^2} + 2{{v'}_{{\rm{Ay}}}}{{v'}_{\rm{B}}} + {\left( {{{v'}_{\rm{B}}}} \right)^2} + {\left( {{{v'}_{{\rm{Ay}}}}} \right)^2} = {\left( {{{v'}_{\rm{A}}}} \right)^2} + {\left( {{{v'}_{\rm{B}}}} \right)^2}\\{\left( {{{v'}_{\rm{A}}}} \right)^2} + {\left( {{{v'}_{\rm{B}}}} \right)^2} + 2{{v'}_{{\rm{Ay}}}}{{v'}_{\rm{B}}} = {\left( {{{v'}_{\rm{A}}}} \right)^2} + {\left( {{{v'}_{\rm{B}}}} \right)^2}\\2{{v'}_{{\rm{Ay}}}}{{v'}_{\rm{B}}} = 0\end{array}\)
As \({v'_{\rm{B}}} \ne 0\), from the above equation, you get:
\({v'_{{\rm{Ay}}}} = 0\) … (iv)
Therefore, from equations (i) and (iv), you get:
\(\begin{array}{c}{\left( {{{v'}_A}} \right)^2} = {\left( {{{v'}_{{\rm{Ax}}}}} \right)^2} + {\left( 0 \right)^2}\\{{v'}_A} = {{v'}_{{\rm{Ax}}}}\end{array}\) … (v)
Hence, the final direction of ball A is along the positive x-axis.
Now, comparing equations (ii) and (v), you get:
\(\begin{array}{c}{{v'}_A} = {v_{\rm{B}}}\\ = 3.7\;{\rm{m/s}}\end{array}\)
Now, from equations (iii) and (iv), you get:
\(\begin{array}{c}{{v'}_{\rm{B}}} = {v_{\rm{A}}}\\ = 2.0\;{\rm{m/s}}\end{array}\)
Hence, the final speed of ball A is \(3.7\;{\rm{m/s}}\), and the final speed of ball B is \(2.0\;{\rm{m/s}}\).