\(x^2+y^2-4x+3=0\Leftrightarrow\left(x-2\right)^2+y^2=1\)
Đặt \(\left\{{}\begin{matrix}x-2=a\\y=b\end{matrix}\right.\) \(\Rightarrow a^2+b^2=1\)
\(\Rightarrow a^2=1-b^2\le1\Rightarrow-1\le a\le1\)
\(M=\left(a+2\right)^2+b^2=a^2+b^2+4a+4\)
\(M=4a+5\ge4.\left(-1\right)+5=1\)
\(M_{min}=1\) khi \(\left(x;y\right)=\left(1;0\right)\)
\(M=4a+5\le4.1+5=9\)
\(M_{max}=9\) khi \(\left(x;y\right)=\left(3;0\right)\)