To solve the exercise it is convenient to graph the points first:
You can see that vertically there are 7 units of the distance between point A and point B:
And you can see that horizontally there are 13 units of the distance between point A and point B:
Now, you can use the Pythagorean Theorem: