The question is asking for you to use the Pythagorean Theorem in order to find the length or line AB.
a^2+b^2=c^2
Since AB is what we are trying to find in this situation it is c. The graphic shown tells us that the length of line CA= (y2-y1) and CB= (x2-x1), these numbers represent a and b in the expression shown above. From here you should implement the information into the equation.
(x^2-x^1)^2+(y2-y1)^2= AB
The next step in finding the product would be to square both sides of the equation. In this case we only need to square the side with the calculation because the variable AB already represents the answer you would calculate. Which leaves us with the answer shown in the image below.