(a)
The electrostatic force exerted between the two sphere is given by:
where
k is the Coulomb's constant
q1, q2 are the charges on the two spheres
r is the separation between the centres of the two spheres
In this problem,
Substituting these values into the equation, we find the force
And the negative sign means the force is attractive, since the two spheres have charges of opposite sign.
(b)
The total net charge over the two sphere is:
When the two spheres are connected, the charge distribute equally over the two spheres (since they are identical, they have same capacitance), so each sphere will have a charge of
So the electrostatic force between the two spheres will now be
And substituting numbers, we find
and the positive sign means the force is repulsive, since the two spheres have same sign charges.