Answer
$2\pi \sqrt{\frac{\rho_1 H}{\rho_2 g}}$
Work Step by Step
We can find the required time period as follows:
$T=2\pi \sqrt{\frac{m}{K}}$.....eq(1)
But $K=\rho_2Ag$ and $m=\rho_1V=\rho_1AH$
We plug in the these values in eq(1) to obtain:
$T=2\pi \sqrt{\frac{\rho_1AH}{\rho_2Ag}}$
$\implies T=2\pi \sqrt{\frac{\rho_1 H}{\rho_2 g}}$