Let me do this with some diagrams. You have started with the task of figuring out what x is in the expression

And the first thing we do is divide by 3 to make this simpler; scaling the boxes up
gives:
Completing the square in this case works by subtraction, so we need to invent negative areas, which I will represent in red. The fundamental idea is that we divide this chunk whose side length is the unknown x into two equal parts and collect them next to our $x^2$ term.
You can maybe see what we're aiming to do by this 90 degree rotation that has happened in the above diagram, we can use these boxes to annihilate some of that area systematically. But after we do this, if we do it carefully, we will “accidentally” leave over a red square:

The issue is that we used one of our negative rectangles to cut away part of the square into a rectangle that was $x$ high but now $x - 2/3$ long, and then we tried to use the other negative rectangle to cut away the remaining rectangle some more: but it had a little bit of extra red left over because of the first cut. The extra red was of size $(2/3)^2 = 4/9$ as marked above, while the unknown square is of size $\left(x - \frac23\right)^2.$
The rest of the argument is just shifting the red square back to the right side and combining it with the square of area $2/3$ to create a square of area $\frac49 + \frac23 = \frac{10}9.$ What they did was they realized in advance that exactly such a square would be necessary, so they added it from the start in the hopes that you would not notice that it is a red square of negative area since that can be somewhat hard to think about.
This argument is somewhat easier in the opposite situation, where you are adding terms, like if you have $x^2 + 6x = 21.$ Then you split up this term into two added rectangles of size 3-by-$x$, you rotate one of them again by 90 degrees, but then you see that you can almost make a new square of size $(x+3)$-by-$(x+3)$ except you are missing a certain 3-by-3 square in the corner. So you just add that to both sides and discover that $(x+3)^2 = 21 + 3^2 = 30.$ Then you can take the square root to find that $x = \pm\sqrt{30} - 3.$