If you have a polynomial with integer coefficients you can try to find the solutions applying the Rational Zeros Theorem.
This theorem says that if a root is rational, it has to have the numerator as one of the factors of the constant and the denominator as one of the factors of the coefficient of the leading term.
It is easier to see in your case.
First of all your polynomial has the coefficients integers, they are
color(red)1, -1, -5, -1, color(blue){-6}1,−1,−5,−1,−6.
The coefficient of the leading term is color(red)11, its possible factors are then color(red){\pm1}±1.
The constant term is color(blue){-6}−6 and the possible factors are color(blue){\pm1, \pm2, \pm3, \pm6}±1,±2,±3,±6.
The theorem tells us that if a rational root exists it must be one of this
\pmcolor(blue)1/color(red)1=\pm1±11=±1
\pmcolor(blue)2/color(red)1=\pm2±21=±2
\pmcolor(blue)3/color(red)1=\pm3±31=±3
\pmcolor(blue)6/color(red)1=\pm6±61=±6
Then we try all of them and see if we obtain zero
x^4-x^3-5x^2-x-6x4−x3−5x2−x−6
x=1x=1
1-1-5-1-6=-121−1−5−1−6=−12 then x=1x=1 is not a root.
x=-1x=−1
1+1-5+1-6=-81+1−5+1−6=−8 then x=-1x=−1 is not a root.
x=2x=2
2^4-2^3-5*2^2-2-6=2024−23−5⋅22−2−6=20 is not a root.
x=-2x=−2
2^4+2^3-5*2^2+2-6=024+23−5⋅22+2−6=0 IS A ROOT.
x=3x=3
3^4-3^3-5*3^2-3-6=034−33−5⋅32−3−6=0 IS A ROOT.
x=-3x=−3
3^4+3^3-5*3^2+3-6=6034+33−5⋅32+3−6=60 is not a root.
x=6x=6
6^4-6^3-5*6^2-6-6=88864−63−5⋅62−6−6=888 is not a root.
x=-6x=−6
6^4+6^3-5*6^2+6-6=133264+63−5⋅62+6−6=1332 is not a root.
We were lucky and we found two roots, -2−2 and 33.
Then we can start our factorization as
x^4-x^3-5x^2-x-6=(x-3)(x+2)(ax^2+bx+c)x4−x3−5x2−x−6=(x−3)(x+2)(ax2+bx+c)
The part that is missing is the quadratic polynomial ax^2+bx+cax2+bx+c.
If we multiply the terms we have
(x^2-x-6)(ax^2+bx+c)(x2−x−6)(ax2+bx+c)
ax^4+bx^3+cx^2-ax^3-bx^2-cx-6ax^2-6bx-6cax4+bx3+cx2−ax3−bx2−cx−6ax2−6bx−6c
ax^4+(b-a)x^3+(c-6a-b)x^2-(c+6b)x-6cax4+(b−a)x3+(c−6a−b)x2−(c+6b)x−6c
if we compare this with the initial polynomial
x^4-x^3-5x^2-x-6x4−x3−5x2−x−6
we have
a=1, b-a=-1, c-6a-b=-5, c+6b=1, 6c=6a=1,b−a=−1,c−6a−b=−5,c+6b=1,6c=6
a=1, b=0, c=1a=1,b=0,c=1.
Then the final factorization is
(x-3)(x+2)(x^2+1)(x−3)(x+2)(x2+1).
If you want to factorize in the complex numbers you can write
(x-3)(x+2)(x+i)(x-i)(x−3)(x+2)(x+i)(x−i).