The sum of the voltages across R and C2 is equal to the voltage of the first capacitor. Q1/C1 =I*R +Q2/C2. As the charge is conserved, Q1+Q2=Qo=const, and I=dQ2/dt=-dQ1/dt, so you have the differential equation (Qo-Q2)C1+Q2/C2+RdQ2/dt=0 with the initial condition Q2(0)=0.