Where and
are the coordinates of the given points.
Substitute and simplify.
You cannot derive "the" equation of the line. There are an infinite number of ways to represent the equation of any line. All you can do is provide "an" equation whose graph is a line that satisfies the given conditions.