(x+y+1)^2
=[(x+y)+1]^2
=(x+y)^2+2(x+y)+1
=x^2+2xy+y^2+2x+2y+1
(x-y+z)^2
=[(x-y)+z]^2
=(x-y)^2+2(x-y)z+z^2
=x^2-2xy+y^2+2xz-2yz+z^2
(m+n-2)^2
=[(m-n)-2]^2
=(m-n)^2-4(m-n)+4
=m^2-2mn+n^2-4m+4n+4
(x+y+1)^2
=[(x+y)+1]^2
=(x+y)^2+2(x+y)+1
=x^2+2xy+y^2+2x+2y+1
(x-y+z)^2
=[(x-y)+z]^2
=(x-y)^2+2(x-y)z+z^2
=x^2-2xy+y^2+2xz-2yz+z^2
(m+n-2)^2
=[(m-n)-2]^2
=(m-n)^2-4(m-n)+4
=m^2-2mn+n^2-4m+4n+4