I got this question in my vector calculus class and I am not really sure how to work it out.

Two billiard balls of equal mass collide. If

u = v + w, u^2 = v^2 + w^2,

are equations representing momentum and energy conservation for the collision, prove the billiard ball theorem: namely that the vectors v and w subtend an angle of ninety degrees after the impact.