Consider the situation shown in fig. The capacitor A has a charge q on it whereas B is uncharged. The charge appearing on the capacitor B a long time after the switch is closed is
When switch 5 is pressed, +q charge induced on outer side of right plate of a flows to the left plate of B. It induces - q charge on inner side of right plate of B and + q charge on outer side of same plate, which flows to earth.