Let's denote the price of an adult ticket as \( x \). According to the problem, a child ticket costs $2 less than an adult ticket, so the price of a child ticket would be \( x - 2 \).
Maggie and her five friends, all 12 years old, bought tickets, which means they purchased 6 child tickets.
The total cost can be expressed as: \[ \text{Total Cost} = \text{Number of Child Tickets} \times \text{Price of Child Ticket} \] Substituting the values, we get: \[ 30 = 6 \times (x - 2) \]
Now we can solve for \( x \): \[ 30 = 6(x - 2) \] Dividing both sides by 6: \[ 5 = x - 2 \] Adding 2 to both sides: \[ x = 7 \]
The price of an adult ticket is \( \boxed{7} \).