f[x_]:=x^3-8x+1;

Manipulate[c=a^3-8a+1;d=b^3-8b+1;Column[{
Show[Plot[x^3-8x+1,{x,-3,4},PlotStyle->AbsoluteThickness[3],AspectRatio->1,ImageSize->400],
Graphics[{{PointSize[0.03],Point[{a,c}],Point[{b,d}]},
{AbsoluteThickness[1.5],Gray,Line[{{1000a-999b,1000c-999d},{1000b-999a,1000d-999c}}]},
{AbsoluteThickness[2],Line[{{a,c},{b,d}}]},
Text[Style[x^3-8x+1,20],{-1.3,25}]}]
],
Style["a = "<>ToString[a],18],Style["b = "<>ToString[b],18]," ",
Style["f(a) = "<>ToString[c],18],Style["f(b) = "<>ToString[d],18],
" ",Style[DisplayForm[RowBox[{"Slope = "FractionBox["f(b)-f(a)","b-a"]," = ",(d-c)/(b-a)}]],18]
}],{{a,1},-3,4},{{b,3.5},-2.9999,4}]