Let the weight of the pan be \( p \) ounces and the weight of each egg be \( e \) ounces.
From the information given:
-
A pan with four eggs weighs 18 ounces: \[ p + 4e = 18 \]
-
A pan with eight eggs weighs 24 ounces: \[ p + 8e = 24 \]
Now, we can set up a system of equations:
- \( p + 4e = 18 \) (Equation 1)
- \( p + 8e = 24 \) (Equation 2)
To eliminate \( p \), we can subtract Equation 1 from Equation 2:
\[ (p + 8e) - (p + 4e) = 24 - 18 \]
This simplifies to:
\[ 4e = 6 \]
Now, solve for \( e \):
\[ e = \frac{6}{4} = \frac{3}{2} \text{ ounces} \]
Now that we know the weight of each egg, we can substitute \( e \) back into one of the original equations to find \( p \). Using Equation 1:
\[ p + 4 \left(\frac{3}{2}\right) = 18 \]
This simplifies to:
\[ p + 6 = 18 \]
Now, solve for \( p \):
\[ p = 18 - 6 = 12 \]
Thus, the weight of the pan is \( \boxed{12} \) ounces.