Question 23105
It's real simple. First find the slope of the line which is given by {{{m=Y2-Y1/X2-X1}}}
Like for your ezample. 
y2=4, y1 = 2
x2=3, x1=1
4-2/3-1
2/2
m=1
Now the slope = 1
Now find the y-intercept "b"
Choose any of the two points.
Like (1,2)
y=2, x=1
2=1(1)=b
2=1+b
b=1
then write the equation y=x+1
then bring x over to the other side.
-x+y=1
Now you can't have a negative in standard form so remove the negative by multiplying the equation by -1. 
-(-x+y=1)
x-y=-1.