I posted this on a programming forum as well, as that's the end result of this problem. But here is where I'm at; am I correct so far?
I'm working on the math now. And this is what I have, am I on the right track?
Ball 1 has mass M1 and is at p1=[2,5] with v1 = [-1,0], ball 2 has mass...