Theo định lý Viet ta có: \(\left\{{}\begin{matrix}x_1+x_2+x_3=m+2\\x_1x_2+x_1x_3+x_2x_3=3m\\x_1x_2x_3=1\end{matrix}\right.\)
\(P=x_1^2+x_2^2+x_3^2=\left(x_1+x_2+x_3\right)^2-2\left(x_1x_2+x_1x_3+x_2x_3\right)\)
\(P=\left(m+2\right)^2-6m=m^2-2m+4\)
\(P=\left(m-1\right)^2+3\ge3\)
\(\Rightarrow P_{min}=3\) khi \(m=1\)