As we move from the first point to the second, x increases from 2 to 10, so the change in x is 8. At the same time, y increases by 1 from 4 to 5. Thus, the slope is m = rise / run = 8/1 = 8.
Using the point-slope formula, we get y-4 = 8(x -2), or 8x - 16.
Isolate y. To do this, add 4 to both sides, obtaining:
y = 8x - 12.
This is the slope-intercept form for the equation of the line thru (2,4) and (10,5).