Let the number of cupcakes that JoJo decorates be represented by \( x \).
According to the information provided, we can set up the equation:
\[ 8 = \frac{1}{3}x + 2 \]
First, we'll subtract 2 from both sides:
\[ 8 - 2 = \frac{1}{3}x \]
\[ 6 = \frac{1}{3}x \]
Next, we can multiply both sides by 3 to solve for \( x \):
\[ 6 \times 3 = x \]
\[ x = 18 \]
So, JoJo decorates 18 cupcakes.