Charge flowing thugh AB when the switch is open.
Equivalent capacitance = 10*5 / 15 = 10/3
.: Charge flowing through AB = CV = 10/3*50 = 500/3

C
When the key is closed ;
no current at all would pass through the capacitor which is connected with it (the one just below the key).
.: we can say that the equivalent capacitance is 10
so charge flowing = 10*50 = 500

C
So the charge which flows through AB when the switch is closed is
=500 - 500/3
=333.3

C
=333.3 * 10-6 C
=3.3 * 10-4 C