Step 2: Find A and B:
Compare coefficients: \(A + B = 1\) and \(5A + 2B = 0\). So \(A = -\frac23\) and \(B = \frac53\).
Step 3: Integrate:
\[ \int\frac{x^2\,dx}{(x^2+2)(x^2+5)} = -\frac23\cdot\frac{1}{\sqrt2}\tan^{-1}\frac{x}{\sqrt2} + \frac53\cdot\frac{1}{\sqrt5}\tan^{-1}\frac{x}{\sqrt5} + c \]
\[ = -\frac{\sqrt2}{3}\tan^{-1}\frac{x}{\sqrt2} + \frac{\sqrt5}{3}\tan^{-1}\frac{x}{\sqrt5} + c \]
since \(\frac{2}{3\sqrt2} = \frac{\sqrt2}{3}\) and \(\frac{5}{3\sqrt5} = \frac{\sqrt5}{3}\). The signs differ because A is negative and B is positive.
Final Answer:
The result matches option (D).
\[ \boxed{-\frac{\sqrt{2}}{3}\tan^{-1}\frac{x}{\sqrt{2}} + \frac{\sqrt{5}}{3}\tan^{-1}\frac{x}{\sqrt{5}} + c} \]