When S1 is closed and S2 open, capacitor will discharge. At time t=R1C, one time constant charge will remain q1=(1e) times of CV or qi=CVe. When S1 is open and S2 closed, charge will increase (or may decrease also) from CVe to CE exponentially. Time constant for this would be (R1C+R2C). Charge as function of time would be,
q=qi+(qf−qi)(1−e−tτC)
After total time 2R1C+R2C or t=R1C+R2C, one time constant in above equation, charge will remain
q=CVe+(CE−CVe)(1−1e)
=EC(1−1e)+VCe2