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,
![y=mx+n](https://img.qammunity.org/2020/formulas/mathematics/middle-school/k09vsk24frsuya3xao6xm29yt64lx4yb38.png)
Then calculate the slope m using the coordinates of two points. Let say A(x1, y1) and B(x2, y2),
![m=\frac{\Delta{y}}{\Delta{x}}=(y_2-y_1)/(x_2-x_1)](https://img.qammunity.org/2020/formulas/mathematics/middle-school/eq62lcf9kt74rkdkdvenc5kjq7c6x8yo7u.png)
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.
![y_1=mx_1+n](https://img.qammunity.org/2020/formulas/mathematics/middle-school/ncucuhyavsqh27s9goun96uxt1mt50psg2.png)
From here you solve the equation for n,
![</p><p>y_1=mx_1+n\Longrightarrow n=y_1-mx_1</p><p>](https://img.qammunity.org/2020/formulas/mathematics/middle-school/20yyl7yznvw0aqf9n0iclnkn4oac0t7afq.png)
So you have slope m and variable n therefore you can write down the equation of the line,
![f(x)=m_(slope)x+n_(variable)](https://img.qammunity.org/2020/formulas/mathematics/middle-school/egpmfgly0a2oh1m2cttat2v7w5av1tzvz2.png)
Hope this helps.
r3t40