I am trying to calculate the final velocities of two equal mass 2-dimensional circles after an elastic collision. I have tried to figure it out using formulas I know from high school physics, but nothing seems to work. My known variables are:

 - initial x and y velocities for each circle
 - x and y distances between the centres of the circles at the time of the collision

The variables I would like to solve for are:

 - final x and y velocities for each circle

Here are diagrams showing all the variables:

[![variable diagrams][1]][1]


  [1]: https://i.sstatic.net/pHezv.png