a.
\(x=6+2\sqrt{5}=\left(\sqrt{5}+1\right)^2\) \(\Rightarrow\sqrt{x}=\sqrt{5}+1\)
\(\Rightarrow B=\dfrac{\sqrt{5}+1-1}{2+\sqrt{5}+1}=\dfrac{\sqrt{5}}{\sqrt{5}+3}=\dfrac{3\sqrt{5}-5}{4}\)
b.
\(B=\dfrac{\sqrt{x}+2-3}{\sqrt{x}+2}=1-\dfrac{3}{\sqrt{x}+2}\)
B nguyên \(\Rightarrow\dfrac{3}{\sqrt{x}+2}\in Z\Rightarrow\sqrt{x}+2=Ư\left(3\right)\)
Mà \(\sqrt{x}+2\ge2\Rightarrow\sqrt{x}+2=3\)
\(\Leftrightarrow\sqrt{x}=1\Rightarrow x=1\)