Total pressure v/s Partial pressure
If the membrane is permeable to both gases, then both gases will become uniformly distributed between the two containers, and the final pressure will be uniform.  So, if the initial pressures in the two containers are $p_1$ and $p_2$, the initial number of moles in the two containers are $$n_1=\frac{p_1V}{RT}$$ and $$n_2=\frac{p_2V}{RT}$$  The total number of moles does not change, so the final pressure is $$p=\frac{(n_1+n_2)RT}{2V}=\frac{p_1+p_2}{2}$$The final mole fractions in the combined container are $p_1/(p_1+p_2)$, and $p_2/(p_1+p_2)$.  The final partial pressures are $p_1/2$ and $p_2/2$.