Calculating voltage output from a circuit with capacitors
This circuit can not be analyzed using normal circuit analysis techniques. It violates our definition of an ideal capacitor or of parallel elements.

Our definition of an ideal capacitor is that \$ i = C dv/dt\$. This implies
that the voltage across a capacitor can not change instantaneously, because doing so would require infinite current. Allowing infinite current blows up any mathematical analysis. So, at the instant when the switch moves to position B we know that the voltages across the capacitors will be the same as it was when the switch was in position A.

At the instant when you move the switch to position B, if the capacitors do not have the same voltage on them then you have two elements in parallel with different voltages, which violates our definition of "parallel" and also violates KVL.

As @ThePhoton has commented, you must have a resistive element between the capacitors to allow meaningful analysis.