When you are only concerned with the remainder from division by 9, the arithmetic is said to be "modulo 9." The statement "when x is divided by 9, the remainder is 4" can also be written as
 : x mod 9 = 4
When the mod 9 operation is applied to arithmetic involving x, we really only need to apply it to the same arithmetic on the remainder. That is
(2x +2) mod 9 = (2·4 +2) mod 9 = 10 mod 9 = 1
The remainder of 2x+2 divided by 9 is 1.
_____
In the general case, the mod 9 remainder being 4 means that the value of x can be written in general as
x = 9n+4 . . . . for some integer n
Then the expression 2x+2 becomes ...
2(9n+4)+2 = 18n +10 = 9(2n+1) +1
so when we divide this number by 9, we can see the remainder will be 1