\(\frac{1-2x}{1-x}+\frac{1-2y}{1-y}=1\)
\(\Leftrightarrow\left(1-2x\right)\left(1-y\right)+\left(1-2y\right)\left(1-x\right)=\left(1-x\right)\left(1-y\right)\)
\(\Leftrightarrow1-2x-2y+3xy=0\)
\(\Rightarrow-xy=2xy-2x-2y+1\)
\(\Rightarrow M=x^2+y^2+2xy-2x-2y+1=\left(x+y-1\right)^2\) (đpcm)