The slope-intercept form:
[tex]y=mx+b[/tex]
m - slope
b - y-intercept
We have the slope [tex]m=3\to y=3x+b[/tex]
and point (2, 4). Substitute:
[tex]4=3(2)+b[/tex]
[tex]4=6+b[/tex] subtract 6 from both sides
[tex]-2=b\to b=-2[/tex]
Answer: [tex]y=3x-2[/tex]