One small remark though: is not the correct the way to write your calculation. This calculation is solved as:
which I think is not what you meant.
The correct way of writing is with either brackets or fractions, like this:
Another way: you want y= mx+ b and both (x, y)= (-2, -7) and (x, y)= (1, -7) must satisfy that equation. Putting those values into the equation, we have -7= m(-2)+ b and -7= m(-1)+ b so can solve the simultaneous equations -2m+ b= -7, -m+ b= -7.
Of course, the easiest way to solve this particular problem is to observe that both points have y-value -7. Since a straight line is determined by two points, that's a horizontal line and y= -7 must be the equation.