Cheme: It's effectively the same thing
y=(y2-y1)(x-x1)/(x2-x1) +y1 = Ax+b
where A= y2-y1/x2-x1 and B=((y2-y1)*x1/x2-x1) +y1
They gave you the solution in general form with gradient and everything from y-y1=m(x-x1) form..
All I did is say
y''(x)=0 --> y'(x)=A -->y(x)=Ax+B where A,B are constant..