The equation of the line passing through point $ \left(-1,~5\right) $, and point $ \left(-7,~5\right) $ is:
$$ y = 5 $$In this example we have:
$$ \begin{aligned} & \left(-1,~5\right) \implies x_A = -1 ~~\text{and}~~ \color{blue}{y_A = 5 } \\[1 em] & \left(-7,~5\right) \implies x_B = -7 ~~\text{and}~~ \color{blue}{y_B = 5 } \end{aligned} $$Since, $ y_A = y_B $ the equation of the line is:
$$ y = y_A $$In this example this is:
$$ y = 5 $$