B - A = (7, 8) - (-5, 8) = (7 -(-5), 8 -8) = (12, 0)
The distance is then ...
d = √(12² + 0²) = √12²
d = 12
_____
Of course, when you graph these points (actually or mentally), you can see that they are 12 units apart on the line y=8. You don't need to do any fancy calculation to discover the difference between -5 and 7.