It's based on the following.
The exponent is the number of three's that are multiplied together.
\(\displaystyle 3(3)3(3)=3^4\)
\(\displaystyle 3(3)=3^2\)
\(\displaystyle 3(3)3(3)3=3^5\)
When multiplying, we just line up all the three's.
\(\displaystyle 3^43^3=[3(3)3(3)][3(3)3]=3(3)3(3)3(3)3=3^7=3^{4+3}\)
the same strategy for other powers, or you could replace all the three's with another repeating number
\(\displaystyle 5^25^7=5^{2+7}=5^9\)
In your example, adding 3 of the same thing is multiplying it by 3.
\(\displaystyle 2+2+2=3(2)\ etc\)