(a) [tex]-1.48\cdot 10^{-5}N[/tex]
The electrostatic force exerted between the two sphere is given by:
[tex]F=k\frac{q_1 q_2}{r^2}[/tex]
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,
[tex]q_1 = 12\cdot 10^{-9} C\\q_2 = -23\cdot 10^{-9} C\\r = 0.41 m[/tex]
Substituting these values into the equation, we find the force
[tex]F=(9\cdot 10^9 Nm^2 C^{-2} )\frac{(12\cdot 10^{-9}C)(-23\cdot 10^{-9} C)}{(0.41 m)^2}=-1.48\cdot 10^{-5}N[/tex]
And the negative sign means the force is attractive, since the two spheres have charges of opposite sign.
(b) [tex]+1.62\cdot 10^{-6}N[/tex]
The total net charge over the two sphere is:
[tex]Q=q_1 +q_2 = 12\cdot 10^{-9}C+(-23\cdot 10^{-9}C)=-11\cdot 10^{-9} C[/tex]
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
[tex]q=\frac{Q}{2}=\frac{-11\cdot 10^{-9}C}{2}=-5.5\cdot 10^{-9}C[/tex]
So the electrostatic force between the two spheres will now be
[tex]F=k\frac{q^2}{r^2}[/tex]
And substituting numbers, we find
[tex]F=(9\cdot 10^9 Nm^2 C^{-2} )\frac{(-5.5\cdot 10^{-9} C)^2}{(0.41 m)^2}=+1.62\cdot 10^{-6}N[/tex]
and the positive sign means the force is repulsive, since the two spheres have same sign charges.