So we are given two points and we have to use them to construct the equation of a line in slope-intercept form:

Where m is the slope and b is the y-intercept. With two given points we can construct two equations for m and b. For example, if we know that the line passes through two generic points (A,B) and (C,D) we have the following equations that are the result of taking (x,y)=(A,B) and (x,y)=(C,D):

The points we have are (-4,-1) and (2,-5). Then we have A=-4, B=-1, C=2 and D=-5 and the two equations for m and b are:

We can take the first equation and add 4m to both sides:

Then we substitute b with this expression in the second equation:

And we add 1 to both sides:

And we divide both sides by 6:

Then we use this value in the expression for b:

Thent the equation we are looking for and answer to this question is:
