first we find the slope by using the slope formula
slope = (y2 - y1) / (x2 - x1)
(2,4)(4,10)
slope = (10 - 4) / (4 - 2) = 6/2 = 3
now we use slope intercept form
y = mx + b
slope(m) = 3
use either of ur points (2,4)...x = 2 and y = 4
now we sub and find b, the y intercept
4 = 3(2) + b
4 = 6 + b
4 - 6 = b
-2 = b
so ur equation is : y = 3x - 2