Ta có: \(\left(x+2022\right)⋮\left(x+5\right)\)
\(\Leftrightarrow\left(x+5\right)+2017⋮\left(x+5\right)\)
\(\Leftrightarrow2017⋮\left(x+5\right)\)
Vì \(x\in Z\) nên \(\left(x+5\right)\inƯ\left(2017\right)=\left\{\pm1;\pm2017\right\}\)
Ta có bảng sau:
x+5 | 1 | -1 | 2017 | -2017 |
x | -4 | -6 | 2012 | -2022 |
Vậy \(x\in\left\{-4,-6,2012,-2022\right\}\)