The formula for determining tha distance between 2 points is expressed as
[tex]\begin{gathered} \text{Distance = }\sqrt{(x2-x1)^2+(y2-y1)^2} \\ \text{From the information given,} \\ x1\text{ = 2, x2 = 5} \\ y1\text{ = 6, y2 = 2} \\ \text{Distance = }\sqrt{(5-2)^2+(2-6)^2} \\ \text{Distance = }\sqrt{9\text{ + 16}}\text{ = }\sqrt{25} \\ \text{Distance = 5} \end{gathered}[/tex]The distance of XY is 5