A line has an equation of a form,

From a graph we can pick two points on the line, say A and B where,

Using their coordinates we are able to calculate slope.

Hence,

The x and y terms can be replaced with coordinates of one point either A or B. I'll pick A.

And now solve for b.

Hence,

Simply,

Hope this helps.
r3t40