Book started to loose contact with shelf when maximum acceleration $a$ of shelf is such that,
$a_{\max } \geq g$
$\Rightarrow \quad \omega^2 A \geq g$
$\Rightarrow \quad \omega^2=\frac{g}{A}$.
So, frequency of oscillations is
$f=\frac{\omega}{2 \pi}=\frac{1}{2 \pi} \sqrt{\frac{g}{A}}$
$\Rightarrow \quad f=\frac{1}{2 \pi} \cdot \sqrt{2.5 \times 10^{-2}}=\frac{2 \times 10}{2 \pi}$
$\Rightarrow \quad f \approx 3.18 \,Hz$

