For example the line is line AB
1) find the gradient(m) of the line AB
2) use y=mx+c
3) substitute either the coordinates of either A or B to find the y-intercept (c)
4) once u find your c, use y=mx+c and substitute m and c. Leave y and x as unknowns
1) find the gradient (m) of line AB
2) use formula : y-y1=m(x-x1)
3) substitute your gradient into the formula
4) substitute the x-coordinate of point A/B to x1 and y-coordinate of point A/B to y1
5) solve it
6) once you've solved it, arrange it in the form of y=mx+c if the question didn't mention in which form they want.
****if you use x-coordinate of point A, use the y-coordinate of point A also. Don't jumble up. They are one set.