To solve this problem it's easier to first find the y-intercept form instead of the standard one, and then re-arrange it in the standard form. The y-intercept form is given below:
[tex]y=m\cdot x+b[/tex]
Where "m" is the slope of the line and "b" is the y-intercept. The problem already informed us of the value of "b", therefore we can use the known point to find the value of "m".
[tex]\begin{gathered} y=m\cdot x+2 \\ 4=m\cdot2+2 \\ m\cdot2=4-2 \\ m\cdot2=2 \\ m=\frac{2}{2}=1 \end{gathered}[/tex]
We now have the slope-intercept line as shown below:
[tex]y=x+2[/tex]
We need to re-arrange it in the standard form, which is shown below:
[tex]A\cdot x+B\cdot x=C[/tex]
Where A,B and C are constants. So we need to isolate the two variables, x and y, on the left side of the equation.
[tex]-x+y=2[/tex]