First of all, note that the claim does not hold for $f=0$. In the sequel, we assume that $f$ is not identical zero.
Set $I_1=[-a,a]$, $I_2=[-b,b]$ for $a,b>0$. Since $f$ is a Schwartz function, hence in particular bounded, we can assume $$\int f^2(x) \, dx = 1.$$
By the uncertainty principle and the assumption on the integrals,
$$\begin{align*} \frac{1}{16 \pi^2} &\leq \left( \int_{\mathbb{R}} x^2 \cdot f(x)^2 \, dx \right) \cdot \left( \int_{\mathbb{R}} x^2 \cdot \hat{f}(x)^2 \, dx \right) \\ &\leq 4 \left( \int_{-a}^a x^2 \cdot f(x)^2 \, dx \right) \cdot \left( \int_{-b}^b x^2 \cdot \hat{f}(x)^2 \, dx \right) \end{align*}$$
Now find a upper bound (depending on $a$, $b$) for the remaining integrals using that $\|f\|_{L^2}=1$ and Plancherel's identity.
Remark Note that there are several definitions for the Fourier transform. The constant $\frac{1}{16\pi^2}$ refers to the Fourier transform
$$\hat{f}(\xi) = \int f(x) \cdot e^{-2\pi \imath \, x \cdot \xi} \, dx$$
Depending on the definition in your book, you might have to modify this constant.