Đặt \(\left\{{}\begin{matrix}x-1=a>0\\y-1=b>0\end{matrix}\right.\)
\(P=\frac{\left(a+1\right)^2}{b}+\frac{\left(b+1\right)^2}{a}\ge\frac{\left(a+b+2\right)^2}{a+b}=\frac{\left(a+b\right)^2+4\left(a+b\right)+4}{a+b}\)
\(P\ge a+b+\frac{4}{a+b}+4\ge2\sqrt{\frac{4\left(a+b\right)}{a+b}}+4=8\)
\(P_{min}=8\) khi \(a=b=1\) hay \(x=y=2\)