Force between the two charges (+q1and+q2), if they are at a distance 'd' is
F1=14πϵ0q1q2d2.....(1)
When the metal spheres are in contact the charge flow from one sphere to another till both the spheres acquire the same charge.
Here q1andq2 are of same sign, hence after contact each sphere will have a charge (q1+q2)2
The new charge Q=q1+q22
Now the force between them,
F2=14πϵ0[q1+q22]2d2.....(2)
From equations (1) and (2)
F2=F1(q1+q1)24q1q2