It looks like you have two points $(x_1,y_1)$ and $(x_2,y_2)$ so you can set up two simultaneous equations
$y_1=mx_1+b$$y_2=mx_2+b$Multiply the first by $x_2$ and the second by $x_1$
$y_1x_2=mx_1x_2+bx_2$$y_2x_1=mx_1x_2+bx_1$subtract:$y_1x_2-y_2x_1=b(x_2-x_1)$ and go from there.
You might also like to investigate the form:$y=y_1\frac{(x-x_2)}{(x_1-x_2)}+y_2\frac{(x-x_1)}{(x_2-x_1)}$ which is a direct way of writing the equation of a line through two points. The form can be developed to give the equation of a quadratic through three points, and generally the lowest degree curve through $n$ points.