You did not read my post carefully.

You did not do the following steps:

First calculate the component of velocity in the direction of (dx,dy)

vp1= vx1 *dx/d+vy1*dy/d;

vp2= vx2*dx+vy2*dy/d;

Collision should have happened dt before you have detected r1+r2

and dt =(r1+r2-d)/(vp1+vp2);// the collision should have occurred at t-dt (Actually this is also an approximation).

So you should move those two ball backward

x1-= vx1*dt;

y2 -= vy1*dt;

x2-=vx2*dt;

y2-=vy2*dt;

Next : do the collision parts. as the normal case.

And move the time forward:

Because we have move time backward dt, we need to move time forward dt.

so

x1+= vx1'*dt;

y1+=vy1'*dt;

x2+=vx2'*dt;

y2+=vy2'*dt;

Now the distance between two ball will be larger than r1+r2.

Please read the following post carefully and follow all the steps.

http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=4.msg15#msg15