If there is a linear factor with rational coefficients it is either (x+1) or (x-1) because the coefficients must be integers and the constant term divides 1.
This means that 1 or -1 is a root. Neither fits so we can't find a linear factor.
So try (x^2 + kx + 1)(x^2 + cx + 1) or (x^2 + kx - 1)(x^2 + cx - 1).
In the first case the coefficients of x ^3 and x are both k+c and the coefficient of x^2 is 2 + kc. I.e. k+c = 6 and kc = 5. This has a solution k = 1, c = 5.
This gives the answer. The second possibility with -1s gives k+c = both 6 and -6 so doesn't work.