Explanation
Step 1
when you have two points of a line, P1, and P2, you can find the slope using:
[tex]\begin{gathered} \text{slope}=\frac{\Delta y}{\Delta x}=\frac{y_2-y_1}{x_2-x_1} \\ \text{where} \\ P1(x_1,y_1) \\ P2(x_2,y_2) \end{gathered}[/tex]Let
P1(2,6)
P2(-7,8)
Step 2
replace
[tex]\begin{gathered} \text{slope}=\frac{\Delta y}{\Delta x}=\frac{y_2-y_1}{x_2-x_1} \\ \text{slope}=\frac{8-6}{-7-2}=\frac{2}{-9}=-\frac{2}{9} \end{gathered}[/tex]I hope this helps you