The slope-intercept form of a line is:
y = ax + b
In which a is the slope and b is the y-intercept, which is the value of y when x = 0.
To write an equation in this form, we need the slope and the y-intercept.
Using two points, we find the slope a dividing the change in y by the change in x. Then, having a, we can replace one of these points into the equation, to find the intercept b.
In this question:
We have points (-3,1) and (3,-5)
Finding the slope:
Change in y: -5 - 1 = -6
Change in x: 3 - (-3) = 3 + 3 = 6
Slope: a = -6/6 = -1
So
y = -x + b
Using the point (-3,1), we have that when x = -3, y = 1. So
1 = -(-3) + b
1 = 3 + b
3 + b = 1
b = 1 - 3
b = -2
The equation is:
y = -x - 2