Find slope using the slope formula.
m=(y2-y1)/(x2-x1)
m=(-2-0)/(2+6)
m=-2/8
m= -1/4
Knowing y=mx+b, plug in m.
y=(-x/4)+b
Plug in a coordinate pair to find the b value. (Either works)
-2=(-2/4)+b
-2=-1/2+b
-2+1/2=b
-3/2=b
Plug in the b value to give the final equation.
y=(-x/4)-3/2