a) \(P=\dfrac{a^2+\sqrt{a}}{a-\sqrt{a}+1}-\dfrac{2a+\sqrt{a}}{\sqrt{a}}+1\left(a>0\right)\)
\(=\dfrac{\sqrt{a}\left(\sqrt{a}+1\right)\left(a-\sqrt{a}+1\right)}{a-\sqrt{a}+1}-\dfrac{\sqrt{a}\left(2\sqrt{a}+1\right)}{\sqrt{a}}+1\)
\(=a+\sqrt{a}-\left(2\sqrt{a}+1\right)+1=a-\sqrt{a}\)
b) Ta có: \(a-\sqrt{a}=a-2.\sqrt{a}.\dfrac{1}{2}+\left(\dfrac{1}{2}\right)^2-\dfrac{1}{4}=\left(\sqrt{a}-\dfrac{1}{2}\right)^2-\dfrac{1}{4}\)
\(\ge-\dfrac{1}{4}\)
\(\Rightarrow P_{min}=-\dfrac{1}{4}\) khi \(a=\dfrac{1}{4}\)