a) Ta có: \(B=\left(\frac{\sqrt{a}+1}{\sqrt{a}-1}+\frac{1-\sqrt{a}}{\sqrt{a}+1}\right):\left(\frac{\sqrt{a}+1}{\sqrt{a}-1}+\frac{\sqrt{a}}{\sqrt{a}+1}+\frac{\sqrt{a}}{1-a}\right)\)
\(=\left(\frac{\left(\sqrt{a}+1\right)^2}{\left(\sqrt{a}-1\right)\left(\sqrt{a}+1\right)}-\frac{\left(\sqrt{a}-1\right)^2}{\left(\sqrt{a}+1\right)\left(\sqrt{a}-1\right)}\right):\left(\frac{\left(\sqrt{a}+1\right)^2}{\left(\sqrt{a}-1\right)\left(\sqrt{a}+1\right)}+\frac{\sqrt{a}\left(\sqrt{a}-1\right)}{\left(\sqrt{a}+1\right)\left(\sqrt{a}-1\right)}-\frac{\sqrt{a}}{\left(\sqrt{a}+1\right)\left(\sqrt{a}-1\right)}\right)\)
\(=\left(\frac{a+2\sqrt{a}+1-\left(a-2\sqrt{a}+1\right)}{\left(\sqrt{a}+1\right)\left(\sqrt{a}-1\right)}\right):\left(\frac{a+2\sqrt{a}+1+a-\sqrt{a}-\sqrt{a}}{\left(\sqrt{a}+1\right)\left(\sqrt{a}-1\right)}\right)\)
\(=\frac{a+2\sqrt{a}+1-a+2\sqrt{a}-1}{\left(\sqrt{a}-1\right)\left(\sqrt{a}+1\right)}:\frac{2a+1}{\left(\sqrt{a}+1\right)\left(\sqrt{a}-1\right)}\)
\(=\frac{4\sqrt{a}}{\left(\sqrt{a}-1\right)\left(\sqrt{a}+1\right)}\cdot\frac{\left(\sqrt{a}-1\right)\left(\sqrt{a}+2\right)}{2a+1}\)
\(=\frac{4\sqrt{a}}{2a+1}\)
b) ĐKXĐ: \(0\le a\ne1\)
Ta có: \(a=9-4\sqrt{5}\)
\(=5-2\cdot\sqrt{5}\cdot2+4\)
\(=\left(\sqrt{5}-2\right)^2\)(nhận)
Thay \(a=\left(\sqrt{5}-2\right)^2\) vào biểu thức \(B=\frac{4\sqrt{a}}{2a+1}\),ta được:
\(B=\frac{4\cdot\sqrt{\left(\sqrt{5}-2\right)^2}}{2\cdot\left(\sqrt{5}-2\right)^2+1}\)
\(=\frac{4\cdot\left|\sqrt{5}-2\right|}{2\cdot\left(9-4\sqrt{5}\right)+1}\)
\(=\frac{4\cdot\left(\sqrt{5}-2\right)}{18-8\sqrt{5}+1}\)(Vì \(\sqrt{5}>2\))
\(=\frac{4\sqrt{5}-8}{19-8\sqrt{5}}\)
Vậy: Khi \(a=9-4\sqrt{5}\) thì \(B=\frac{4\sqrt{5}-8}{19-8\sqrt{5}}\)