(x-y)^2+y(2*x-y)
To simplify this:
(x-y)2 → x2 - 2xy + y2
y(2x - y) → 2xy - y2
Add these up and you get (x-y)2 + y(2x - y) = x2
.