a) Giải:
Để A có giá trị là số nguyên thì \(x+1⋮x-2\)
Ta có:
\(x+1⋮x-2\)
\(\Rightarrow\left(x-2\right)+3⋮x-2\)
\(\Rightarrow3⋮x-2\)
\(\Rightarrow x-2\in\left\{\pm1;\pm3\right\}\)
+) \(x-2=1\Rightarrow x=3\)
+) \(x-2=-1\Rightarrow x=1\)
+) \(x-2=3\Rightarrow x=5\)
+) \(x-2=-3\Rightarrow x=-1\)
Vậy \(x\in\left\{3;1;5;-1\right\}\)
b) Để B có giá trị nguyên thì \(2x-1⋮x+5\)
Ta có:
\(2x-1⋮x+5\)
\(\Rightarrow\left(2x+10\right)-9⋮x+5\)
\(\Rightarrow2.\left(x-5\right)-9⋮x+5\)
\(\Rightarrow-9⋮x+5\)
\(\Rightarrow x+5\in\left\{\pm1;\pm3;\pm9\right\}\)
+) \(x+5=1\Rightarrow x=-4\)
+) \(x+5=-1\Rightarrow x=-6\)
+) \(x+5=3\Rightarrow x=-2\)
+) \(x+5=-3\Rightarrow x=-8\)
+) \(x+5=9\Rightarrow x=4\)
+) \(x+5=-9\Rightarrow x=-14\)
Vậy \(x\in\left\{-4;-;-2;-8;4;-14\right\}\)