Step 1: Spot the repeated factor.
The bottom is $(x^2+1)^3$, the same block cubed. This lets us use a neat substitution instead of long algebra.
Step 2: Make the substitution.
Let $t = x^2+1$, so $x^2 = t-1$ and $x^4 = (t-1)^2$.
Step 3: Rewrite the numerator.
The top $x^4+24x^2+28$ becomes \[ (t-1)^2 + 24(t-1) + 28 \]
Step 4: Expand and tidy.
This equals $t^2 - 2t + 1 + 24t - 24 + 28 = t^2 + 22t + 5$.
Step 5: Divide by the bottom.
\[ \frac{t^2+22t+5}{t^3} = \frac{1}{t} + \frac{22}{t^2} + \frac{5}{t^3} \]
Step 6: Put back t.
Replace $t = x^2+1$ to get \[ \boxed{\frac{1}{x^2+1} + \frac{22}{(x^2+1)^2} + \frac{5}{(x^2+1)^3}} \]