By the standard definition, the value $$\sum_{n=1}^\infty a_n = a_1 + a_2 + a_3 + \cdots$$
is equal to the limit $$\lim_{N\to\infty}\sum_{n=1}^Na_n$$
IF this limit exists, and is not defined if the limit does not exist. In your case, the limit does not exist, therefore the sum is not defined, therefore marking the sum $x$ does NOT magically allow you to treat it as a number. The equation $x-1=2x$ simply isn't true.
There are some (for undergraduates, let's call them "non-standard") mathematical tricks in which you can assign some sort of number to infinite divergent sums using tricks like the one you used in your question. For that, see this article on Ramanujan sumation.
Important: Note that I did not say "summing up the divergent sums", but rather "assigning a number to the divergent sum", because, as I already explained, in the standard definition of the sum of an infinite series, divergent sums cannot be summed.