a)
ĐK: \(a>0\)
\(P=\dfrac{\sqrt{a}\left(\sqrt{a}^3+1\right)}{a-\sqrt{a}+1}-\dfrac{\sqrt{a}\left(2\sqrt{a}+1\right)}{\sqrt{a}}+1\\ =\sqrt{a}\left(\sqrt{a}+1\right)-\left(2\sqrt{a}+1\right)+1\\ =a+\sqrt{a}-2\sqrt{a}-1+1\\ =a-\sqrt{a}\)
b)
\(a>1\Rightarrow\sqrt{a}-1>0\Rightarrow\sqrt{a}\left(\sqrt{a}-1\right)>0\)
\(\Rightarrow\left|P\right|=P\)