Answer
$$ Q_1= \dfrac{C_1C_2V_0} {C_1+C_2} $$
$$ Q_2^/=\dfrac{ C_2^2V_0} {C_1+C_2} $$
Work Step by Step
First of all, we need to find the charge stored in the second capacitor when the switch was connected downward.
$$Q_2=C_2V_2=C_2V_0\tag 1$$
When the switch is connected upward, the two capacitors are now connected in parallel, so they have the same potential difference.
Thus,
$$V=V_1=V_2$$
hence,
$$\dfrac{Q_1 }{C_1}=\dfrac{Q_2^/}{C_2}$$
where $Q_2^/$ is the new charge of the second capacitor.
Thus,
$$Q_2^/=\dfrac{Q_1C_2}{C_1}\tag 2$$
Remember that the two amounts of charges are the sum of the initial charge of the second capacitor in the first case.
$$Q_2=Q_1+Q_2^/$$
Plugging from (2);
$$Q_2=Q_1+\dfrac{Q_1C_2}{C_1}=Q_1\left[1+\dfrac{ C_2}{C_1}\right]$$
Plugging from (1);
$$C_2V_0= Q_1\left[1+\dfrac{ C_2}{C_1}\right]$$
Thus,
$$Q_1=\dfrac{C_2V_0}{1+\dfrac{ C_2}{C_1}}=\dfrac{C_2V_0}{ \dfrac{C_1+C_2}{C_1}}$$
$$\boxed{Q_1= \dfrac{C_1C_2V_0} {C_1+C_2}} $$
Plugging into (2);
$$Q_2^/=\dfrac{C_1C_2V_0} {C_1+C_2}\cdot \dfrac{ C_2}{C_1} $$
$$\boxed{Q_2^/=\dfrac{ C_2^2V_0} {C_1+C_2}} $$