It seems like you don't really understand how to combine like terms in an equation, since your explanation about the 2x is not correct. Let me rewrite your question with some color to make the explanation a little easier.
+5x -4 -2x +1 = +8x +2
If we rewrite the equation like this, then we can move the terms around however we want as long as we don't cross the equals sign. Let's group the "like terms" together. Like terms are terms that have the same number of x's (or any other letter).
+5x -2x -4 +1 = +8x +2
Now do the addition/subtraction for each set of like terms.
+5x - 2x = 3x
-4 + 1 = -3
Result:
+3x -3 = +8x +2
Next, we want to join like terms across the equals sign. Remember what an equals sign means: that each side is always exactly the same. So, just like if you had two piles of apples to which you can add an apple to each pile and they will still be the same, you can do the same in math. (Note that you can do almost ANYTHING as long as you do it to both sides--just like you can paint all the apples white and the piles will still be the same). Let's join the x terms first, by moving the x term on the right side to the left side.
+3x -8x -3 = +8x -8x +2
And again do the addition/subtraction for like terms.
+3x -8x = -5x
+8x -8x = 0x = 0
So we have:
-5x -3 = +2
We can follow the same process as above to move the -3 to the other side of the equals sign so that all of the x's are on one side and all of the non-x's are on the other. We get:
-5x = +5
Finally, we want to get just one x. Since -5x = -5 * x, we have to divide to get rid of the -5. Just like with addition, we can do anything to one side of the equals as long as we do the same thing to the other side. So, we can divide both sides by -5:
(-5x) / (-5) = (+5) / (-5)
Simplify each side:
(-5x) / (-5) = (-5 / -5) * x = 1 * x = x
+5 / -5 = -1
So, finally, we get:
x = -1
Some of these steps are not obvious, and if you don't understand them please feel free to ask for clarification of any particular step.