Explanation:
If there are 2 points (a,b) and (c,d),
then the slope = (d - b)/(c - a) = (b - d)/(a - c)
Therefore slope = (10 - 4)/(4 - 2) = 6/2 = 3
The point-slope form of a line is
y = mx + b, where m is the slope and b is the y-intercept Substituting either point (2,4) or (4,10) into the equation is fine.
(4) = (3)(2) + b
4 = 6 + b
b = 4 - 6 = -2
y = 3x - 2
Or
(10)=(3)(4) + b
10 = 12 + b
b = 10 - 12 = -2
y = 3x - 2