How do you solve y=mx+b for m?

Subtract b from each side to get $y - b = m x$. Next, divide each side by $x$ to get $\frac{y - b}{x} = m$.