$$ \begin{aligned} 2m+12 &= 3m-31&& \text{move the $ \color{blue}{ 3m } $ to the left side and $ \color{blue}{ 12 }$ to the right} \\[1 em]2m-3m &= -31-12&& \text{simplify left and right hand side} \\[1 em]-m &= -43&& \text{switch signs on both sides} \\[1 em]m &= 43&& \\[1 em] \end{aligned} $$