a: \(B=\dfrac{\sqrt{x}+2}{\sqrt{x}+1}+\dfrac{2-\sqrt{x}}{\sqrt{x}-1}\)
\(=\dfrac{\left(\sqrt{x}+2\right)\left(\sqrt{x}-1\right)+\left(2-\sqrt{x}\right)\left(\sqrt{x}+1\right)}{\left(\sqrt{x}+1\right)\left(\sqrt{x}-1\right)}\)
\(=\dfrac{x-\sqrt{x}+2\sqrt{x}-2+2\sqrt{x}+2-x-\sqrt{x}}{x-1}\)
\(=\dfrac{2\sqrt{x}}{x-1}\)
b: \(x=\sqrt{17+12\sqrt{2}}=\sqrt{\left(3+2\sqrt{2}\right)^2}=3+2\sqrt{2}\)
Thay \(x=3+2\sqrt{2}\) vào B, ta được:
\(B=\dfrac{2\sqrt{3+2\sqrt{2}}}{3+2\sqrt{2}-1}\)
\(=\dfrac{2\cdot\sqrt{\left(\sqrt{2}+1\right)^2}}{2\sqrt{2}+2}=\dfrac{2\left(\sqrt{2}+1\right)}{2\left(\sqrt{2}+1\right)}=1\)