Ta có: \(x+y\ge2\sqrt{xy}\Rightarrow3xy\ge2\sqrt{xy}+1\Rightarrow3xy-2\sqrt{xy}-1\ge0\)
\(\Rightarrow\left(3\sqrt{xy}+1\right)\left(\sqrt{xy}-1\right)\ge0\Rightarrow\sqrt{xy}-1\ge0\) (do \(3\sqrt{xy}+1>0\) )
\(\Rightarrow\sqrt{xy}\ge1\Rightarrow xy\ge1\Rightarrow1-xy\le0\)
\(P=\dfrac{y\left(x+1\right)+x\left(y+1\right)}{xy\left(x+1\right)\left(y+1\right)}=\dfrac{2xy+x+y}{xy\left(xy+x+y+1\right)}\)
\(\Rightarrow P=\dfrac{2xy+3xy-1}{xy\left(xy+3xy\right)}=\dfrac{5xy-1}{4\left(xy\right)^2}=\dfrac{-4\left(xy\right)^2+5xy-1}{4\left(xy\right)^2}+1\)
\(\Rightarrow P=\dfrac{\left(1-xy\right)\left(4xy+1\right)}{4\left(xy\right)^2}+1\)
Do \(\left\{{}\begin{matrix}1-xy\le0\\4xy+1>0\\4\left(xy\right)^2>0\end{matrix}\right.\) \(\Rightarrow\dfrac{\left(1-xy\right)\left(4xy+1\right)}{4\left(xy\right)^2}\le0\)
\(\Rightarrow P\le0+1=1\Rightarrow P_{max}=1\) khi \(x=y=1\)