(5x^3)^3 = 125x^9. Your first step was incorrect.
125x^6 + 1 ---> (5x^2)^3 + 1
Set u=5x^2 so the equation becomes u^3+1.
The factor theorem states if f(a)=0 then x-a is a factor.
f(-1) = 0 --->-1^3+1=0. So u-1 is a factor.
(u-1)(u^2-u+1). (Substitute 5x^2 back in for u).
(5x^2-1)(25x^4-5x^2+1).