Explanation:
Note that the line goes through the points
and
so we can calculate the slope m of the line as follows:

which makes our equation take the form

To find the value of b, use either P1 or P2. Let's use P1:

Therefore, the equation for the line is
