Để phương trình có nghiệm thì :
\(\Delta_x=a^2-\left(2a^2+b^2-5\right)\ge0\)
\(\Leftrightarrow a^2+b^2\le5\)
\(\Leftrightarrow\left(a+b\right)^2\le5+2ab\)
\(\Leftrightarrow ab\ge\frac{\left(a+b\right)^2-5}{2}\)
Ta có :
\(P=\left(a+1\right)\left(b+1\right)=ab+a+b+1\)
\(\ge\frac{\left(a+b\right)^2-5}{2}+\left(a+b\right)+1=\frac{1}{2}\left(a+b+1\right)^2-2\ge-2\)
Dấu " = " xảy ra khi \(\hept{\begin{cases}a=-2\\b=1\end{cases}}\)