To find the slope, you calculate the ratio of change in y-axis values to change in x-axis values.
[tex]\frac{\Delta y}{\Delta x}=\frac{1--5}{7-2}=\frac{6}{5}=m[/tex]Here x1= 2 x2=7 change in x=7-2 =5
and
y1=-5 , y2 = 1 , change in y= 1--5=6
The slope is 6/5