Consider the right triangle HBF. The Pythagorean theorem tells you ...
HF² = HB² + BF²
The lengths HB and BF can be determined by counting grid squares, or by subtracting coordinates. Here, it is fairly convenient to count grid squares. When we do that, we find ...
HB = 2
BF = 5
Using these values in the equation above, we get
HF² = 2² + 5²
HF² = 4 + 25 = 29
Taking the square root gives the length HF.
HF = √29