$$ \begin{aligned} 5 &= 2x+7&& \text{ swap the left and right side of the equation } \\[1 em]2x+7 &= 5&& \text{ move 7 to the right } \\[1 em]2x &= 5-7&& \\[1 em]2x &= -2&& \text{ divide both sides by $ 2 $ } \\[1 em]x &= -\frac{2}{2}&& \\[1 em]x &= -1&& \\[1 em] \end{aligned} $$