Given:

To find- the distance between A and B.
Explanation-
The distance formula is given below-

Substitute the values, and we get

On further solving, we get

The square root of 82 is done below-
Hence, the distance between (-4,2), and (5,1) is 9.055.
The answer is 9.055.