Given the set a = {X & sup2;, x, XY}, B = {1, x, y}, and a = B, find the values of real numbers x and y

Given the set a = {X & sup2;, x, XY}, B = {1, x, y}, and a = B, find the values of real numbers x and y

A={x²,x,xy},B={1,x,y}
X & sup2; = 1, xy = y → x = 1 or x = - 1, y = 0
Or X & sup2; = y, xy = 1 → x = 1
X = 1 → X & sup2; = x, no solution
So x = - 1, y = 0