Question 283150
We need to find two things suing the points.
y=mx+b
we need to find m the slope and b the y intercept.
One of your points is the y intercept
the y intercept is y when x=0
so that makes it very easy
we just need to find m
there are several ways to do that since we already have b the y intercept.
y=mx-2
plug in either x and y
0=-1*m-2
2=-m
m=-2
so now we plug in -2 for m and -2 for b
y=-2x-2
done
This was unusual since we had the y intercept.
That is not the normal way to do it.

starting all over
The more common way would be 
(-1,0), (0,-2)
y-y/x-x=m
-2-0/0-(-1)=m
-2/1=-2=m

now we have the slope m=-2
y=mx+b
pick either point
0=-1*-2+b
0=2+b
-2=b
y=-2x-2
same answer slightly different way to find it.
It is also a bit odd that the slope m and the y intercept b are the same.