Slope-intercept form:
y = mx + b
"m" is the slope, "b" is the y-intercept (the y value when x = 0)
Since you know m = 2, you can plug it into the equation
y = mx + b
y = 2x + b
To find "b", plug in the point (2,4) into the equation
y = 2x + b
4 = 2(2) + b
4 = 4 + b Subtract 4 on both sides
0 = b
y = 2x + 0
y = 2x