By a cutoff function argument, it suffices to assume $f$ is compactly supported, so we can integrate by parts without picking up boundary terms.
Thus
$$\int (xf')^2 = \int (x^2f') f' = -\int 2xf'f - \int x^2 f'' f$$
Hence using Cauchy-Schwarz,
$$\|xf'\|_2^2 \le \int |2xf f'| + \int |x^2 f f''| \le 2\|xf\|_2 \|f'\|_2 + \|x^2f\|_2 \|f''\|_2.$$
The second term is finite by our assumption. For the first term, note that
$$\|xf\|_2^2 = \int x^2 f^2 = \int |x^2f| |f| \le \|x^2f\|_2 \|f\|_2$$
and
$$\|f'\|^2 = \int (f')^2 = -\int f f'' \le \int |f f''| \le \|f\|_2 \|f''\|_2.$$
Putting everything together, we have
$$\|xf'\|_2^2 \le 2 \|f\|_2 \sqrt{\|f''\|_2 \|x^2f\|_2} + \|x^2f\|_2 \|f''\|_2.$$