The correct equation should look something like this:
y= -1x - 2
Consider the equation for a line:
y = mx + b,
Where ‘m’ is the slope
Where ‘b’ is the y-intercept.
From there you can plug in your known values for ‘m’ and ‘b’, and get the equation above. If you are still not convinced, I suggest you graph the function and observe its slope and y-intercept.
Hope this helps!