For gas A, $n_A = \large\frac{2P \times V}{RT}$ and $n_B = \large\frac{P \times V}{4RT}$
After oprning the partition, $n_A + n_B = \large \frac{9P}{4RT}$
$n = n_A + n_B = \large\frac{2P'V}{3RT}$$ =\large \frac{9P}{4RT}$
$\Rightarrow P' = \large\frac{27P}{8}$