You don't actually need to use the slope formula to know the slope of the line through the points (-5, 2) and (-7, 2).
Because both points have the same y-coordinate, you know the line is a horizontal.
All horizontal lines have a slope of 0.
Therefore, the slope of the line is 0.
As an additional note, if two points have the same x-coordinates, then the line is vertical and has an undefined slope.
We'll recall the identity that gives the slope of a line that is passing through two points:
m = (y2-y1)/(x2-x1)
We'll identify the coordinates x1 = -5, x2 = -7, y1 = 2 and y2 = 2
We'll plug in the values of the coordinates and we'll get:
m = (2-2)/(-7+5)
m = 0/-2
m = 0
The line is parallel to x axis and the requested slope is m = 0.