Two asteroids of equal mass in the asteroid belt between Mars and Jupiter collide with a glancing blow. Asteroid A, which was initially traveling at 40.0 m/s with respect to an inertial frame in which asteroid B was at rest, is deflected 30.0 degrees from its original direction, while asteroid B travels at 45.0 degrees under the x-axis.
I need to find the final velocities of both asteroids.
402 = VA2 + VB2
The Attempt at a Solution
40 cos 30 and more like that but it's obviously wrong