The basic principle of high school and middle school algebra is the use of inverse operations.
What you're seeing here is repeated use of the fact that $+$ has the inverse operation $-$ and $\times$ has the inverse operation $\div$.
More technically speaking, we see that these equations are solvable because there are inverse elements of each element in the equation. We can undo any operations that are present in the equation, which allows us to find the solution for $x$ or whatever variable is present.
I find that quadratic equations really explain just how important these fundamental observations are. We take it for granted in middle school, high school, and sometimes college that for a polynomial $ax^2+bx+c=0$ there are two solutions: $x=\frac{-b+\sqrt{b^2-4ac}}{2a} \text{ and } x=\frac{-b-\sqrt{b^2-4ac}}{2a}.$
However, think about this: What if there was no such thing as $\frac{1}{2a}$? As absurd as this question may seem to you now, this kind of thinking is very important in higher math. It is the existence of the inverse element $\frac{1}{2a}$ (among other elements) that allows us to solve these quadratic equations. This same situation occurs in linear equations and other equations.
At the risk of sounding stupid or uninformed (I'm not entirely confident with abstract algebra), I'd like to explain just why the above questions and others are so relevant. The quadratic formula doesn't always work. Yes, in high school, it always works. But why? Because we're considering the equation $ax^2+bx+c=0$ with $a,b,c,x$ in the field $(\mathbb{C},+,\cdot)$. You may not know what a field is right now, but I can give you an idea of why it's an interesting concept and how it relates to the essence of your question.
The field $(\mathbb{C},+,\cdot)$ is the collection of all elements which are composed of usage of addition and multiplication on complex numbers. (Division and subtraction are technically not relevant: We can add any negative number to perform subtraction and likewise multiply any fraction to divide.) What's important here is this: The characteristics of the field you're working in determines what equations are solvable! That is the beauty of abstract algebra (well, one of the many) to me. It is no longer simply, "We know that $x$ is blah blah." It's that we know there is always going to be a solution to particular sets of equations on the basis of the characteristics of our field.
I'm rambling a bit here, but I hope this was enlightening!
P.S. All of you on Math.SE that are way more enlightened than me, please tell me if I've butchered any of the technicalities. I apologize profusely if that is the case, and I'll correct it as swiftly as possible. Thank you.