You say you can do part 1 without trouble. I will assume that is true. I get $A=\dfrac{1}{a-b}$ and $B=\dfrac{1}{b-a}$. Using the substitution $u = x^2, r = -a^2, s = -b^2$, you can rewrite:

$\dfrac{1}{(x^2+a^2)(x^2+b^2)} = \dfrac{1}{(u-r)(u-s)}$

Then try the partial fractions values you found:

$\begin{align*}\dfrac{1}{(u-r)(u-s)} & = \dfrac{A}{u-r} + \dfrac{B}{u-s} \\ & = \dfrac{1}{r-s}\dfrac{1}{u-r} + \dfrac{1}{s-r}\dfrac{1}{u-s}\end{align*}$

Substituting backwards:

$\dfrac{1}{(x^2+a^2)(x^2+b^2)} = \dfrac{1}{(b^2-a^2)(x^2+a^2)}+\dfrac{1}{(a^2-b^2)(x^2+b^2)}$

To show that this solution is correct, the common denominator for the RHS is $(a^2-b^2)(x^2+a^2)(x^2+b^2)$, so:

$\begin{align*}\dfrac{1}{(b^2-a^2)(x^2+a^2)} + \dfrac{1}{(a^2-b^2)(x^2+b^2)} & = \dfrac{-(x^2+b^2)+x^2+a^2}{(a^2-b^2)(x^2+a^2)(x^2+b^2)} \\ & = \dfrac{a^2-b^2}{(a^2-b^2)(x^2+a^2)(x^2+b^2)} \\ & = \dfrac{1}{(x^2+a^2)(x^2+b^2)}\end{align*}$