Before opening the switch potential difference across both the capacitors is V, as they are in parallel. Hence, energy stored in them is,

After opening the switch, potential difference across it is V and its capacity is 3C

In case of capacitor B, charge stored in it is q = CV and its capacity is also 3C.
