Since switches 2 and 3 are kept open, The bottom 2 capacitors are not taken into account when we do our calculations.
Thus, we can say that the right plate of the top 3uF and the left plate of the top 6 uF are part of an isolated system. If we assume that charge flows from left to right then we can say that charge on the left plate of the 3 uF capacitor us 150+q and on the right plate is -150-q. The charge is then 600+q on the left plate of the 6uF and -600-q on the right plate. Therefore, we can form the equation 2(150+Q)+(600+Q)=12.
This implies that Q=100 coulombs, which means that the charge on P is 600+Q=700 C.