Explanation:
the slope is always the ratio
y coordinate difference / x coordinate difference
when going from one point on the line to another.
so, when going from (5, p) to (6, 0)
x changes by +1 (from 5 to 6).
y changes by (0-p) (from p to 0).
the slope is -p/+1 = -p
we know that the actual slope is 8 (or 8/1).
so,
8 = -p
p = -8