$$ \begin{aligned} 187 &= -w+49&& \text{ swap the left and right side of the equation } \\[1 em]-w+49 &= 187&& \text{ move 49 to the right } \\[1 em]-w &= 187-49&& \\[1 em]-w &= 138&& \text{switch signs on both sides} \\[1 em]w &= -138&& \\[1 em] \end{aligned} $$