The general formula of an equation is [tex]y=mx+b[/tex] we are told that the y-intercept is -2 as such we have the following so far [tex]y=mx-2[/tex]
to calculate the slope we do the following:
[tex]y=mx-2 \\ 12=m(4)-2 \\ 12=4m-2 \\ 14=4m \\ m= \frac{14}{4} [/tex]
therefore the equation is
[tex]y= \frac{14}{4}x-2 [/tex]