(d) Initial charge on sphere of radius $R = q$
Charge on this sphere after joining
$q^{'} = \frac{(q + ( - 2q) \times R}{R + 2R} = \frac{- q \times R}{3R} = - \frac{q}{3}$
Now charge flowing between them $= q - \left( - \frac{q}{3} \right) = \frac{4q}{3}$