In this case, take the first few derivatives and discern a pattern. In this case, for $n \ge 2$, even derivatives will be nonzero at $x=0$, while odd derivatives will be zero. Why?
Consider the first few derivatives of the function $f(x) = x^2 \cos{a x}$:
$$f'(x) = -a x^2 \sin{a x} + 2 x \cos{a x}$$
$$f''(x) = -a^2 x^2 \cos (a x)-4 a x \sin (a x)+2 \cos (a x)$$
$$f'''(x)=a^3 x^2 \sin (a x)-6 a^2 x \cos (a x)-6 a \sin (a x)$$
Note that the factors $x^2 \cos{a x}$, $x \sin{a x}$, and $\cos{a x}$ appear in even derivatives, and $x^2 \sin{a x}$, $x \cos{a x}$, and $\sin{a x}$ appear in odd derivatives. This will be the case no matter what.
To see this, take the second derivative of $A x^2 \cos{a x} + B x \sin{a x} + C \cos{a x}$: you will get another linear combination of these terms. Same for $A x^2 \sin{a x} + B x \cos{a x} + C \sin{a x}$. Therefore $f^{(97)}(0) = 0$ because $97$ is odd.