A linear function means you’re working with a line. Lines can be stated in slope-intercept form: y=mx+b.
To make it a linear function, you simply replace “y” with “f(x)” notation: f(x) = mx + b
The information you gave told you m=2 and b=6, since (0,b) is the y-intercept.
Putting that all together you have:
f(x) = 2x + 6