Answer:
7.07 units
Explanation:
You want the length of line segment AB that has 5 units both horizontally and vertically between A and B.
Pythagorean theorem
The Pythagorean theorem tells you the relation between the hypotenuse (c) and the legs (a, b) of a right triangle.
Here, you can draw or imagine a right triangle oriented with the grid such that one leg is 5 units horizontally and the other leg is 5 units vertically between points A and B. Then the length of AB is the hypotenuse of the triangle, and we have ...
c² = a² +b²
AB² = 5² +5² = 50
AB = √50 ≈ 7.07
The length of AB is 7.07 units.
__
Additional comment
You will notice that this length can be written in simplified form as ...
AB = √50 = √(25·2) = 5√2
That is, the distance along the hypotenuse is √2 times the equal horizontal and vertical leg lengths. This is typical of an isosceles right triangle, and is something you will see again.