You can use the distance formula.
The distance formula says the distance between two given points (x1, y1) and (x2, y2)
=

Your given points are (8, -1) and (-2, -1).
The distance will be

.
But you could have recognized that both points have the same y-coordinate of -1, which means change in distance is determined by change in x-coordinates only.
Change in x-coordinates is |-8 - 2| = 10. There is absolute value because distance cannot be negative.