The equation of the line passing through point $ \left(1,~4\right) $, and point $ \left(6,~-1\right) $ is:
$$ x+y-5=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(1,~4\right) \implies x_A = 1 ~~\text{and}~~ y_A = 4 \\[1 em] & \left(6,~-1\right) \implies x_B = 6 ~~\text{and}~~ y_B = -1 \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 - 4~&=~\frac{ -1 - 4 }{ 6 - 1 } \left( x - 1 \right) \\[1 em]y - 4 ~&=~ -1 \left( x - 1 \right) \\[1 em]y - 4 ~&=~ -1x + 1 \\[1 em]y ~&=~ -1x + 5 \end{aligned} $$