(3x^2+2x-1)/((x+5)(x^2+1)) becomes ...
(3x^2+2x-1)/((x+5)(x^2+1))=A/(x+5)+(Bx+C)/(x^2+1)
Multiply through by (x+5)(x^2+1)
(3x^2+2x-1)=A(x^2+1)+(Bx+C)(x+5)
First solve for A
x=-5
(3(-5)^2+2(-5)-1)=A((-5)^2+1)+(B(-5)+C)((-5)+5)
(3(25)-10-1)=A(25+1)+(-5B+C)(0)
(75-10-1)=A(26)+(-5B+C)(0)
64=26A
64/26=(26A)/26
32/13=A
Now solve for C
Substitute in for x and A
x=0, A=32/13
(3(0)^2+2(0)-1)=(32/13)((0)^2+1)+(B(0)+C)((0)+5)
(-1)=(32/13)(1)+(C)(5)
-1=32/13+5C
-1-32/13=5C
(-13)/13-32/13=5C
(-45)/13=5C
((-45)/13)/5=(5C)/5
((-45)/13)*1/5=C
((-9)/13)*1/1=C
(-9)/13=C
Substitute in A and C and let x=1 as you solve for B
(3(1)^2+2(1)-1)=(32/13)((1)^2+1)+(B(1)+((-9)/13))((1)+5)
(3+2-1)=(32/13)(1+1)+(B-9/13)(1+5)
4=(32/13)(2)+(B-9/13)(6)
4=(64/13)+(6B-54/13)
4-64/13+54/13=6B
52/13-64/13+54/13=6B
106/13-64/13=6B
42/13=6B
(42/13)/6=(6B)/6
(42/13)*1/6=B
7/13=B
Substitute in A, B, and C
(3x^2+2x-1)/((x+5)(x^2+1))=(32/13)/(x+5)+((7/13)x+(-9)/13)/(x^2+1)
(3x^2+2x-1)/((x+5)(x^2+1))=32/(13(x+5))+(7x+(-9))/(13(x^2+1))
Partial-Fraction Decomposition
(3x^2+2x-1)/((x+5)(x^2+1))=32/(13(x+5))+(7x-9)/(13(x^2+1))