y=-x+5
Explanation
Step 1
if you have two points of a line P1 and P2, the slope is given by:
[tex]\begin{gathered} \text{slope}=\text{ }\frac{y_2-y_1}{x_2-x_1} \\ \text{where} \\ P1(x_1,y_1)\text{ and }P2(x_2,y_2) \end{gathered}[/tex]Let
P1=(1,4)
P2=(6,-1)
replace,
[tex]\begin{gathered} \text{slope}=\text{ }\frac{y_2-y_1}{x_2-x_1} \\ \text{slope}=\text{ }\frac{-1-4}{6-1}=\frac{-5}{5}=-1 \\ \text{slope}=-1 \end{gathered}[/tex]Step 2
find the Point -slope equation using the slope founded and P1
[tex]\begin{gathered} y-y_1=slope(x-x_1) \\ \text{replace} \\ y-4=-1(x-1) \\ y-4=-x+1 \\ y=-x+1+4 \\ y=-x+5 \end{gathered}[/tex]I hope this helps you.