Let say the voltage at left side is V1 and on the right V2.
When s1 is closed the voltage across C is V1-V2. The charge of C is C(V1-V2). Now s1 is opened and s2 is closed. The voltage across C is V2-V1 and the charge on it is C(V2-V1). So the charge transferred out of the capacitor should be C (V1-V2) - C (V2-V1) is 2C(V1-V2). Why is this quantity 2C(V1-V2) multiplied by 2 again?
So I had one more question, what would be the expression output equivalent resistance for the following switched capacitor circuit. Here V2 is connected to gnd during phi2.