=[(x+y)-2xy][(x+y)-2]+(xy-1)^2
=(x+y)^2-2(x+y)(xy+1)+4xy+(xy-1)^2
=(x+y)^2-2(x+y)(xy+1)+(xy+1)^2
=(x+y-xy-1)^2