\(A=\dfrac{x^2+3x+4}{x+1}=\dfrac{x\left(x+1\right)+2\left(x+1\right)+2}{x+1}=x+2+\dfrac{2}{x+1}\)
\(A\in Z\Leftrightarrow\dfrac{2}{x+1}\in Z\Leftrightarrow x+1\in\text{Ư}\left(2\right)=\left\{-2;-1;1;2\right\}\)
\(\Leftrightarrow x\in\left\{-3;-2;0;1\right\}\)
\(B=\dfrac{\sqrt{x}}{\sqrt{x}-3}=\dfrac{\left(\sqrt{x}-3\right)+3}{\sqrt{x}-3}=1+\dfrac{3}{\sqrt{x}-3}\)
\(B\in Z\Leftrightarrow\dfrac{3}{\sqrt{x}-3}\in Z\Leftrightarrow\sqrt{x}-3\in\text{Ư}\left(3\right)=\left\{-3;-1;1;3\right\}\)
\(\Leftrightarrow x\in\left\{0;3\right\}\)