First, find the slope through the equation (y2-y1)/(x2-x1), which in your case is (7-(-2))/(1-4)=9/-3=-3. So your slope is -3.
Then, substitute any of the points in the equation:
(y-y1)=slope(x-x1), which in your case could be:
1. (y-(-2)=-3(x-4)= y+2=-3x+12= y=-3x+10.
2. (y-7)=-3(x-1)= y-7= -3x+3= y= -3x+10.