Lời giải:
a.
\(A=\frac{\sqrt{x}(\sqrt{x}+3)+4(\sqrt{x}-3)+21-13\sqrt{x}}{(\sqrt{x}-3)(\sqrt{x}+3)}.\frac{9(x+3\sqrt{x}+9)}{(\sqrt{x}-3)(x+3\sqrt{x}+9)}\)
\(=\frac{x-6\sqrt{x}+9}{(\sqrt{x}-3)(\sqrt{x}+3)}.\frac{9}{\sqrt{x}-3}=\frac{9(\sqrt{x}-3)^2}{(\sqrt{x}-3)(\sqrt{x}+3)(\sqrt{x}-3)}=\frac{9}{\sqrt{x}+3}\)
b.
Với $x$ nguyên, để $A$ nguyên thì $\sqrt{x}+3$ là ước của $9$
Mà $\sqrt{x}+3\geq 3$ nên $\sqrt{x}+3\in\left\{3;9\right\}$
$\Rightarrow x\in\left\{0; 36\right\}$ (tm)

