(a) Connected by a wire, the spheres reach the same potential V. A sphere of radius R has capacitance 4πε0R, so its charge is Q=4πε0RV:
QbQa=ba
The surface field of each sphere is E=4πε0R2Q, so
EbEa=QbQa×a2b2=ba×a2b2=ab
The smaller sphere has the stronger surface field.
(b) Initially A holds Q=CV and B holds nothing. When they are joined (in parallel) the charge is conserved and shared until both are at a common potential:

V′=total capacitancetotal charge=C+2CCV=3V
(i) QA=C⋅3V=3CV and QB=2C⋅3V=32CV, so
QA:QB=1:2
(ii) Initial energy (A alone):
Ui=21CV2
Final energy (A and B together, both at V/3):
Uf=21C(3V)2+21(2C)(3V)2=18CV2+9CV2=6CV2
UiUf=CV2/2CV2/6=31
Two-thirds of the energy is lost as heat in the connecting wires while the charge flows.