The capacitor 1 has capacitance and as dielectric contains in capacitor 2 so its capacitance becomes .
The net capacitance
When dielectric is reemoved from capacitor 2, its capacitance becomes .
now net capacitance
When the capacitors are connected in series, they each have the same charge as the net capacitance. Thus, and