Let the cost of an adult ticket be \( a \) and the cost of a child ticket be \( c \). We can set up the following equations based on the information provided:
-
For 3 adults and 2 children: \[ 3a + 2c = 31 \quad \text{(1)} \]
-
For 2 adults and 3 children: \[ 2a + 3c = 29 \quad \text{(2)} \]
Now, we will solve these two equations simultaneously. First, we can multiply equation (1) by 3 and equation (2) by 2 to make the coefficients of \( c \) the same:
\[ 9a + 6c = 93 \quad \text{(3)} \] \[ 4a + 6c = 58 \quad \text{(4)} \]
Next, we can subtract equation (4) from equation (3):
\[ (9a + 6c) - (4a + 6c) = 93 - 58 \] \[ 5a = 35 \] \[ a = 7 \]
Now that we have \( a \), we can substitute it back into either equation (1) or equation (2) to find \( c \). Let's substitute into equation (1):
\[ 3(7) + 2c = 31 \] \[ 21 + 2c = 31 \] \[ 2c = 31 - 21 \] \[ 2c = 10 \] \[ c = 5 \]
So, the cost of an adult ticket is \( a = 7 \) and the cost of a child ticket is \( c = 5 \).
Now we know that the problem states a group consisting of some adults and 6 children paid $58 for tickets. We can set up the equation:
\[ xa + 6c = 58 \]
Substituting \( a \) and \( c \):
\[ 7x + 6(5) = 58 \] \[ 7x + 30 = 58 \] \[ 7x = 58 - 30 \] \[ 7x = 28 \] \[ x = 4 \]
Thus, the number of adults in this group is \( \boxed{4} \).