find the velocity of ball A and ball B after collision