Let $m_A=2m$
$m_B=3m$
density of liquid $=\rho$
density of block $B= 2 \rho$
The acceleration of the system , when block B is inside the liquid, will be given by,
net force acting on the system.
$a_1 = \large\frac{m_Ag-(m_Bg-upthrust \;on\;B)}{m_A+m_B}$
$\qquad= \large\frac{2mg-\bigg[3mg -\Large\frac{3m}{2 \rho}\normalsize \rho g\bigg]}{5m}$
$\qquad= \large\frac{g}{10}$
$\qquad= Constant$
But when the block is outside the liquid.
the acceleration of the system is in opposite direction.
$a_2= \large\frac{m_B g- m_A g}{m_A+m_B}$
$\qquad= \large\frac{3mg-2mg}{5m}$
$\qquad=\large\frac{g}{5}$
$\qquad$= constant
Since $a_1$ and $a_2$ are constants, motion is periodic but not simple harmonic.
Hence a is the correct answer