First you must acknowledge that you are dealing with a line therefore you must write linear equation or linear function in this case.
Linear function has a form of,

Then calculate the slope m using the coordinates of two points. Let say A(x1, y1) and B(x2, y2),

Now pick a point either A or B and insert coordinates of either one of them in the linear equation also insert the slope you just calculated, I will pick point A.

From here you solve the equation for n,

So you have slope m and variable n therefore you can write down the equation of the line,

Hope this helps.
r3t40