We know that A transformation which uses a line that acts like a mirror with an image reflected in the line, is called a reflection. The line with acts like a mirror is called the line of reflection
in this problem the line of reflection is y=x
if (x,y) is reflected in the line y=x its image is the point (y,x)