a) \(P=\left(\sqrt{x}-\dfrac{x+2}{\sqrt{x}+1}\right):\left(\dfrac{\sqrt{x}}{\sqrt{x}+1}-\dfrac{\sqrt{x}-4}{1-x}\right)\)
\(P=\left(\dfrac{\sqrt{x}\left(\sqrt{x}+1\right)}{\sqrt{x}+1}-\dfrac{x+2}{\sqrt{x}+1}\right):\left(\dfrac{\sqrt{x}}{\sqrt{x}+1}+\dfrac{\sqrt{x}-4}{x-1}\right)\)
\(P=\left(\dfrac{x+\sqrt{x}}{\sqrt{x}+1}-\dfrac{x+2}{\sqrt{x}+1}\right):\left(\dfrac{\sqrt{x}}{\sqrt{x}+1}+\dfrac{\sqrt{x}-4}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}\right)\)
\(P=\dfrac{x+\sqrt{x}-x-2}{\sqrt{x}+1}:\left(\dfrac{\sqrt{x}\left(\sqrt{x}-1\right)}{\left(\sqrt{x}+1\right)\left(\sqrt{x}-1\right)}+\dfrac{\sqrt{x}-4}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}\right)\)
\(P=\dfrac{\sqrt{x}-2}{\sqrt{x}+1}:\left(\dfrac{x-\sqrt{x}}{\left(\sqrt{x}+1\right)\left(\sqrt{x}-1\right)}+\dfrac{\sqrt{x}-4}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}\right)\)
\(P=\dfrac{\sqrt{x}-2}{\sqrt{x}+1}:\dfrac{x-\sqrt{x}+\sqrt{x}-4}{\left(\sqrt{x}+1\right)\left(\sqrt{x}-1\right)}\)
\(P=\dfrac{\sqrt{x}-2}{\sqrt{x}+1}:\dfrac{x-4}{\left(\sqrt{x}+1\right)\left(\sqrt{x}-1\right)}\)
\(P=\dfrac{\sqrt{x}-2}{\sqrt{x}+1}:\dfrac{\left(\sqrt{x}+2\right)\left(\sqrt{x}-2\right)}{\left(\sqrt{x}+1\right)\left(\sqrt{x}-1\right)}\)
\(P=\dfrac{\sqrt{x}-2}{\sqrt{x}+1}.\dfrac{\left(\sqrt{x}+1\right)\left(\sqrt{x}-1\right)}{\left(\sqrt{x}+2\right)\left(\sqrt{x}-2\right)}\)
\(P=\dfrac{\sqrt{x}-1}{\sqrt{x}+2}\)