We can't use computers for factorising the number, as it's from a math contest where no computers are allowed. So I need to find a way with some manipulations. I can't find a way to approach it.
2 Answers
A possible exploratory approach which is lucky to work:
The average of $989$ and $1001$ and $1007$ is $999$ so the product is slightly less than $999^3$
If $n=999$ then the product is $(n-10)(n+2)(n+8) = n^3-84n-160$
So adding $320=2\times 160$ gives $n^3-84n+160$
which is going to factorise as $(n+10)(n-2)(n-8)$ by swapping the earlier signs
so in this case to $1009 \times 997 \times 991$
and you can check these are prime by hand (e.g. none divisible by $31$ since $31\times 32=992$ and you do not need to consider primes greater than $\sqrt{1009}$).

- 157,058
-
This is essentially a special case of reflection for $\rm\color{#c00}{odd}$ functions - see my answer. – Bill Dubuque Nov 13 '23 at 18:47
Hint a factorization arises immediately by $\rm\color{#c00}{reflecting}$ an $\rm\color{#c00}{odd}$ function, cf. Proposition below.
$\qquad\ \,\overbrace{f(x)=(x\!-\!10)(x\!+\!2)(x\!+\!8)}^{\textstyle f(999)=989\cdot 1001\cdot 1007}\Rightarrow f(x)\!+\!320 =\overbrace{-f(-x) = (x\!+\!10)(x\!-\!2)(x\!-\!8)}^{\textstyle -f(-999)=1009\cdot 997\cdot 991\ \ \ \ \, }$
Proposition $\ \ \ \ \ \ f(x) = g(x)-c \,\Rightarrow\, f(x)\,+\,2c = -f(-x)\ $ if $\,g\,$ is $\rm\color{#c00}{odd},\,$ i.e. $\,\color{#c00}{g(-x) = -g(x)}$
Proof $\ \ \ \ \, f(x) + 2c = \color{#c00}{g(x)}+c = \color{#c00}{-}(\color{#c00}{g(-x)}-c) = -f(-x).$
$\!\begin{align}{\bf Generally}\ \ \ a\!+\!b\!+\!c=0\ \Rightarrow\ &(x\!-\!a)(x\!-\!b)(x\!-\!c) +2abc\\[.2em] =\ \ &(x\!+\!a)(x\!+\!b)(x\!+\!c).\ \ \ {\rm OP\ is}\ \ x,a,b,c = 999,10,-2,-8.\end{align}$
Any product $ABC$ with integer average $\,x := (A\!+\!B\!+\!C)/3\,$ has the above form in integers by defining $\,a,b,c\,$ so that $\,A = x\!-\!a,\,$ $\,B = x\!-\!b,\,$ $\,C = x\!-\!c,\,$ e.g. the OP has average $\,x = 999\,$ hence $\,a = x\!-\!A=999\!-\!989 = 10,\,$ $\,b = 999\!-\!1001 = -2,\,$ $\,C = 999\!-\!1007 = -8,\,$ hence $\,2abc = 2(10)(-2)(-8) = 320\,$ is the shift yielding the negation reflection.

- 272,048
-
Note in OP: $,c = f(0) = -160,$ and $,g(x)=f(x)-c = f(x)-f(0),$ is $\rm\color{#c00}{odd}$ simply because it is a cubic where the coef's of $,x^0$ and $,\color{#0a0}{x^2}$ vanish, i.e. $,g(0) = f(0)-f(0),$ and $,\color{#0a0}{-10+2+8} = 0\ \ $ – Bill Dubuque Nov 13 '23 at 19:10
-
The Proposition is a special case of a general bisection into even & odd parts, i.e. recall that the even part $f_0(x)$ of $f(x)$ is $,f_0(x) = \frac{f(x)+f(-x)}2,$ so $,f(x)- 2\color{#0a0}{f_0(x)} = -f(-x).,$ The Proposition is simply the very special case when the even part $,\color{#0a0}{f_0(x) = -c},$ is constant. $\ \ $ – Bill Dubuque Nov 14 '23 at 01:54
For $989\cdot1001\cdot1007 + 320$ we have $989\cdot1001\cdot1007 + 320\equiv0\pmod p$ and we have to determine $p=991$ and the other primes have easy determination by adition of small numbers to $p$.
– Piquito Nov 13 '23 at 16:25