$${\frac{p_mS}{\rho_mg} = \frac{pS}{(\rho_v +\rho_m - 2\rho)g} \quad\Rightarrow\quad \frac{p_m}{\rho_m} = \frac{p}{\rho_v +\rho_m - 2\rho}\quad}$$