One must not substitute z -> x + iy as well as w -> x + iy, that paves the way into confusion. Substitute instead z -> x + iy, w -> u + iv and go ahead, express u and v by the real and imaginary part of the left hand side.