Let \( x \) be the number of students enrolled in each yoga class initially. Since there are 6 classes, the total number of students initially enrolled in the studio is:
\[ 6x \]
Given that 24 students withdraw and the remaining students total 96, we can set up the equation:
\[ 6x - 24 = 96 \]
To solve for \( x \), first, add 24 to both sides:
\[ 6x = 96 + 24 \] \[ 6x = 120 \]
Next, divide both sides by 6:
\[ x = \frac{120}{6} \] \[ x = 20 \]
Thus, the initial number of students enrolled in each yoga class is \( \boxed{20} \).
Verification:
- Initially, the total number of students is \( 6 \times 20 = 120 \).
- After 24 students withdraw, the number of remaining students is \( 120 - 24 = 96 \), which matches the problem statement. Therefore, the answer \( \boxed{20} \) is confirmed to be correct.