We know that the equation of the line through two points (x1,y1) & (x2,y2) is y−y1=y2−y1x2−x1(x−x1)
So, equation of the line through the points (1,−1) and (3,5) is
(y−(−1))=5−(−1)3−1(x−1)
⇒y+1=5+12(x−1)
⇒y+1=62(x−1)
⇒y+1=3(x−1)
⇒y+1=3x−3
⇒y−3x+1+3=0
⇒y−3x+4=0
Hence the required equation is
y−3x+4=0 or 3x−y−4=0