Substitute the slope into :

Substitute the coordinates of the point for x and y:

Solve for b: , so

Rewrite with and :