Ta có: \(a+b+c=6\)
\(\Rightarrow\left(a+b+c\right)^2=6^2\)
\(\Rightarrow a^2+b^2+c^2+2ab+2ac+2bc=36\)
Mà: \(a^2+b^2+c^2=12\left(1\right)\)
\(\Rightarrow12+2ab+2ac+2bc=36\)
\(\Rightarrow2ab+2ac+2bc=24\)
\(\Rightarrow ab+ac+bc=12\left(2\right)\)
Từ (1) và (2) \(\Rightarrow a^2+b^2+c^2=ab+ac+bc\)
\(\Rightarrow2\left(a^2+b^2+c^2\right)=2\left(ab+ac+bc\right)\)
\(\Rightarrow2a^2+2b^2+2c^2-2ab-2ac-2bc=0\)
\(\Rightarrow\left(a^2-2ab+b^2\right)+\left(a^2-2ac+c^2\right)+\left(b^2-2bc+c^2\right)=0\)
\(\Rightarrow\left(a-b\right)^2+\left(a-c\right)^2+\left(b-c\right)^2=0\)
Mà: \(\left\{{}\begin{matrix}\left(a-b\right)^2\ge0\forall a,b\\\left(a-c\right)^2\ge0\forall a,c\\\left(b-c\right)^2\ge0\forall b,c\end{matrix}\right.\)
Dấu "=" xảy ra:
\(\left\{{}\begin{matrix}a-b=0\\a-c=0\\b-c=0\end{matrix}\right.\Leftrightarrow a=b=c=\dfrac{6}{3}=2\)
\(\Rightarrow P=\left(2-3\right)^{2023}+\left(2-3\right)^{2023}+\left(2-3\right)^{2023}\\ =\left(-1\right)^{2023}+\left(-1\right)^{2023}+\left(-1\right)^{2023}=-1-1-1=-3\)