\(B=\dfrac{a+\sqrt{a}+1-a+\sqrt{a}-1}{\sqrt{a}}+\dfrac{\sqrt{a}-1}{\sqrt{a}}\cdot\dfrac{a+2\sqrt{a}+1+a-2\sqrt{a}+1}{a-1}\)
\(=2+\dfrac{1}{\sqrt{a}}\cdot\dfrac{2a+2}{\sqrt{a}+1}\)
\(=\dfrac{2a+2\sqrt{a}+2a+2}{\sqrt{a}\left(\sqrt{a}+1\right)}=\dfrac{4a+2\sqrt{a}+2}{\sqrt{a}\left(\sqrt{a}+1\right)}\)