The slope m of a straight line passing through points (x₁,y₁) and (x₂,y₂) can be calculated like this:
m = change in y-value / change in x-value
⇒ m = (y₂ - y₁) / (x₂ -x₁)
∵ the points (5, -6) and (-2, 8) are given, substituting :
⇒ m = ( 8 - (-6)) / (-2 - (5))
⇒ m = 14 / (-7) = -2
∴ m = -2 is slope