\(P=\left(\sqrt{a}-\dfrac{a+2}{\sqrt{a}+1}\right):\left(\dfrac{\sqrt{a}}{\sqrt{a}+1}-\dfrac{\sqrt{a}-4}{1-a}\right)\)
\(=\left(\dfrac{\sqrt{a}\left(\sqrt{a}+1\right)-a-2}{\sqrt{a}+1}\right):\left(\dfrac{\sqrt{a}\left(\sqrt{a}-1\right)}{\left(\sqrt{a}+1\right)\left(\sqrt{a}-1\right)}+\dfrac{\sqrt{a}-4}{\left(\sqrt{a}-1\right)\left(\sqrt{a}+1\right)}\right)\)
\(=\left(\dfrac{\sqrt{a}-2}{\sqrt{a}+1}\right):\left(\dfrac{a-4}{\left(\sqrt{a}-1\right)\left(\sqrt{a}+1\right)}\right)\)
\(=\left(\dfrac{\sqrt{a}-2}{\sqrt{a}+1}\right):\left(\dfrac{\left(\sqrt{a}+2\right)\left(\sqrt{a}-2\right)}{\left(\sqrt{a}-1\right)\left(\sqrt{a}+1\right)}\right)\)
\(=\left(\dfrac{\sqrt{a}-2}{\sqrt{a}+1}\right).\left(\dfrac{\left(\sqrt{a}-1\right)\left(\sqrt{a}+1\right)}{\left(\sqrt{a}+2\right)\left(\sqrt{a}-2\right)}\right)\)
\(=\dfrac{\sqrt{a}-1}{\sqrt{a}+2}\)
b.
\(P=\dfrac{2\sqrt{a}-2}{2\left(\sqrt{a}+2\right)}=\dfrac{3\sqrt{a}-\left(\sqrt{a}+2\right)}{2\left(\sqrt{a}+2\right)}=\dfrac{3\sqrt{a}}{2\left(\sqrt{a}+2\right)}-\dfrac{1}{2}\)
Do \(\left\{{}\begin{matrix}\sqrt{a}\ge0\\\sqrt{a}+2>0\end{matrix}\right.\) \(\Rightarrow\dfrac{3\sqrt{a}}{2\left(\sqrt{a}+2\right)}\ge0\)
\(\Rightarrow P\ge-\dfrac{1}{2}\)
\(P_{min}=-\dfrac{1}{2}\) khi \(\dfrac{3\sqrt{a}}{2\left(\sqrt{a}+2\right)}=0\Leftrightarrow a=0\)