\(A=\dfrac{3x^2-9x+x-3+2}{x-3}\)
\(B=\dfrac{x^2\left(x+2\right)+5\left(x+2\right)}{\left(x+2\right)^2}=\dfrac{x^2+5}{x+2}=x-2+\dfrac{9}{x+2}\)
Để A và B cùng là số nguyên thì
\(\left\{{}\begin{matrix}x-3\in\left\{1;-1;2;-2\right\}\\x+2\in\left\{1;-1;3;-3;9;-9\right\}\end{matrix}\right.\Leftrightarrow}\left\{{}\begin{matrix}x\in\left\{4;2;5;1\right\}\\x\in\left\{-1;-3;1;-5;7;-11\right\}\end{matrix}\right.\)
hay x=1