Ta có : \(P=\frac{\frac{\left(x-y\right)^3}{\left(\sqrt{x}+\sqrt{y}\right)^3}+2x\sqrt{x}+y\sqrt{y}}{x\sqrt{x}+y\sqrt{y}}+\frac{3\left(\sqrt{xy}-y\right)}{x-y}\)
=> \(P=\frac{\frac{\left(\sqrt{x}+\sqrt{y}\right)^3\left(\sqrt{x}-\sqrt{y}\right)^3}{\left(\sqrt{x}+\sqrt{y}\right)^3}+2x\sqrt{x}+y\sqrt{y}}{\sqrt{x}^3+\sqrt{y}^3}+\frac{3\sqrt{y}\left(\sqrt{x}-\sqrt{y}\right)}{\left(\sqrt{x}-\sqrt{y}\right)\left(\sqrt{x}+\sqrt{y}\right)}\)
=> \(P=\frac{\left(\sqrt{x}-\sqrt{y}\right)^3+2x\sqrt{x}+y\sqrt{y}}{\sqrt{x}^3+\sqrt{y}^3}+\frac{3\sqrt{y}}{\sqrt{x}+\sqrt{y}}\)
=> \(P=\frac{x\sqrt{x}-3x\sqrt{y}+3y\sqrt{x}-y\sqrt{y}+2x\sqrt{x}+y\sqrt{y}}{\left(x+y\right)\left(x-\sqrt{xy}+y\right)}+\frac{3\sqrt{y}}{\sqrt{x}+\sqrt{y}}\)
=> \(P=\frac{3x\sqrt{x}-3x\sqrt{y}+3y\sqrt{x}}{\left(x+y\right)\left(x-\sqrt{xy}+y\right)}+\frac{3\sqrt{y}}{\sqrt{x}+\sqrt{y}}\)
=> \(P=\frac{3\sqrt{x}\left(x-\sqrt{xy}+y\right)}{\left(\sqrt{x}+\sqrt{y}\right)\left(x-\sqrt{xy}+y\right)}+\frac{3\sqrt{y}}{\sqrt{x}+\sqrt{y}}\)
=> \(P=\frac{3\sqrt{x}}{\sqrt{x}+\sqrt{y}}+\frac{3\sqrt{y}}{\sqrt{x}+\sqrt{y}}\)
=> \(P=\frac{3\sqrt{x}+3\sqrt{y}}{\sqrt{x}+\sqrt{y}}=\frac{3\left(\sqrt{x}+\sqrt{y}\right)}{\sqrt{x}+\sqrt{y}}=3\)