Given that muffins are sold in packages of 12 and cookies are sold in packages of 6, we need to determine the smallest number of muffins sold when the number of muffins sold equals the number of cookies sold.
Let \( m \) be the number of muffins sold and \( c \) be the number of cookies sold. We know:
\[ m = 12x \quad \text{for some integer } x \] \[ c = 6y \quad \text{for some integer } y \]
Since the bakery sold the same number of muffins and cookies, we can set these two expressions equal to each other:
\[ 12x = 6y \]
To simplify this equation, we can divide both sides by 6:
\[ 2x = y \]
This tells us that \( y \) (the number of packages of cookies) must be an even number. That means we can express \( y \) in terms of \( x \):
\[ y = 2x \]
Substituting back into the expressions for muffins and cookies, we have:
\[ m = 12x \] \[ c = 6(2x) = 12x \]
Thus, both \( m \) and \( c \) are equal when \( y = 2x \).
To find the smallest number of muffins, we can choose the smallest positive integer for \( x \), which is 1:
\[ m = 12(1) = 12 \]
Thus, the smallest number of muffins that the bakery could have sold is:
\[ \boxed{12} \]
To verify, if \( x = 1 \):
- Number of muffins sold = \( 12 \)
- Number of cookie packages sold = \( y = 2(1) = 2 \)
- Number of cookies sold = \( 6y = 6 \times 2 = 12 \)
Both muffins and cookies sold amount to 12, confirming that our calculations are correct. So, the smallest number of muffins sold is indeed 12.