I don't know how doing this

Slope intercept form - y = m(x) + b. m represents slope, b represents the y-intercept. You should be able to plug in any value for y and x into the equation, and it should result in a true statement.
The y-intercept is easy to find. It is the point where X is equal to zero and the graph line crosses through the y axis. In this case, y intersects at -2. Since we insert the y intercept at b, we can go ahead and plug it in there.
y = m(x) + b > y = m(x) - 2
Since there is only one option with the y intercept equalling -2, you can go ahead and pick D) y = -x - 2 as your answer, since no other options have the correct y-intercept.