(A) Let the original charge on sphere $A$ be $q$ and that on $B$ be $q^{\prime}$. At a distance $r = 10 \, cm$ between their centres,the magnitude of the electrostatic force on each is given by Coulomb's law:
$F = \frac{1}{4 \pi \varepsilon_{0}} \frac{q q^{\prime}}{r^{2}}$
When an identical but uncharged sphere $C$ touches $A$,the charges redistribute on $A$ and $C$. By symmetry,each sphere carries a charge $q/2$.
Similarly,after $D$ touches $B$,the redistributed charge on each is $q^{\prime}/2$.
Now,the new distance between the centres of $A$ and $B$ is $r^{\prime} = 5.0 \, cm = r/2$.
The new magnitude of the electrostatic force on each is:
$F^{\prime} = \frac{1}{4 \pi \varepsilon_{0}} \frac{(q/2)(q^{\prime}/2)}{(r/2)^{2}}$
$F^{\prime} = \frac{1}{4 \pi \varepsilon_{0}} \frac{q q^{\prime} / 4}{r^{2} / 4}$
$F^{\prime} = \frac{1}{4 \pi \varepsilon_{0}} \frac{q q^{\prime}}{r^{2}} = F$
Thus,the electrostatic force on $A$ due to $B$ remains unchanged.