Answer
$y=x+2$
Work Step by Step
$f(0)=2$ can be written as $(0,2)$ and $f(2)=4$ as $(2,4)$.
Slope $m=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}=\frac{4-2}{2-0}=\frac{2}{2}=1$
Because the line crosses the y-axis at $(0,2)$,
Y-intercept $b=2$.
Equation of line in the slope-intercept form is
$y=mx+b$.
Substituting the values of $m$ and $b$, we get an equation of line as
$y=1x+2$
That is, $y=x+2$