\(\Delta'=4-2m\ge0\Rightarrow m\le2\)
Theo Viet ta có: \(\left\{{}\begin{matrix}x_1+x_2=2\left(m+1\right)\\x_1x_2=m^2+4m-3\end{matrix}\right.\)
Đặt \(P=x_1+x_2-x_1x_2\)
\(P=2\left(m+1\right)-\left(m^2+4m-3\right)\)
\(P=-m^2-2m+5\)
\(P=-\left(m^2+2m+1\right)+6\)
\(P=-\left(m+1\right)^2+6\le6\)
\(\Rightarrow P_{max}=6\) khi \(m+1=0\Leftrightarrow m=-1\)