The equation of the line passing through point $ \left(-2,~7\right) $, and point $ \left(-8,~4\right) $ is:
$$ x-2y+16=0 $$To find equation of the line passing through points $ A(x_A,y_A) $ and $ B(x_B,y_B) $, we use formula:
$$ y - y_A~=~\frac{y_B - y_A}{x_B - x_A}(x-x_A) $$In this example we have:
$$ \begin{aligned} & \left(-2,~7\right) \implies x_A = -2 ~~\text{and}~~ y_A = 7 \\[1 em] & \left(-8,~4\right) \implies x_B = -8 ~~\text{and}~~ y_B = 4 \end{aligned} $$After substituting into the formula, we obtain:
$$ \begin{aligned} y - y_A~&=~\frac{y_B - y_A}{x_B - x_A}(x - x_A) \\[1 em] y - 7~&=~\frac{ 4 - 7 }{ -8 - \left(-2\right) } \left( x - \left(-2\right) \right) \\[1 em]y - 7 ~&=~ \frac{ 1 }{ 2 } \left( x + 2 \right) \\[1 em]y - 7 ~&=~ \frac{ 1 }{ 2 }x + 1 \\[1 em]y ~&=~ \frac{ 1 }{ 2 }x + 8 \end{aligned} $$