To write the equation of a straight line, you need its slope and a known point.
Given two points on the line (x1,y1) and (x2,y2), the slope of the line is
m = (y2 - y1)/(x2 - x1).
The straight line equation
y - y1 = m(x - x1)
where (x1,y1) is one of the known points can then be used.