Take the difference in y coordinates and divide that by the difference in the x coordinates. That's the slope, sometimes called the "rise over run" For a straight line or a linear function the slope is a constant
(6-10)(7,10) = 2/3 = slope
the line is
y-h = m(x-k) where m=2/3 and (k,h) = (10,10) or either point
to get y-10 = (2/3)(x-10)
3y -30 = 2x-20
2x-3y = -10
or use (k,h) as (7,8)
y-8 = (2/3)(x-7)
3y-24 = 2x-14
2x-3y = -10
or if you write it in y=mx + b form
it's y=(2/3)x + 10/3 where 10/3 is the y-intercept and 2/3 = slope
In this form, take the derivative of (2/3)x + 10/3
to get y' = 2/3, the derivative is the slope