\(P=\sqrt{\left(1-x\right)^2+y^2}+\sqrt{\left(x+1\right)^2+y^2}+2-y\)
\(P\ge\sqrt{\left(1-x+x+1\right)^2+\left(y+y\right)^2}+2-y\)
\(P\ge\sqrt{4y^2+4}+2-y=2\sqrt{y^2+1}+2-y\)
Xét hàm \(f\left(y\right)=2\sqrt{y^2+1}-y+2\)
\(f'\left(y\right)=\frac{2y}{\sqrt{y^2+1}}-1=0\Leftrightarrow2y=\sqrt{y^2+1}\) (\(y\ge0\))
\(\Leftrightarrow3y^2=1\Rightarrow y=\frac{\sqrt{3}}{3}\)
Từ BBT ta thấy \(f\left(y\right)_{min}=f\left(\frac{\sqrt{3}}{3}\right)=2+\sqrt{3}\)
\(\Rightarrow P_{min}=2+\sqrt{3}\)