To find the smallest number of erasers that Cara can buy while ensuring she purchases the same number of pencils, we need to relate the packages of pencils and erasers:
- Pencils come in packages of 12.
- Erasers come in packages of 4.
Let \( p \) be the number of packages of pencils that Cara buys, and \( e \) be the number of packages of erasers. The total number of pencils \( P \) and the total number of erasers \( E \) can be expressed as:
\[ P = 12p \] \[ E = 4e \]
We want the total number of pencils to equal the total number of erasers, so we set \( P = E \):
\[ 12p = 4e \]
To solve for \( e \) in terms of \( p \), we can rearrange this equation:
\[ e = \frac{12p}{4} \] \[ e = 3p \]
This means that for every \( p \) packages of pencils, Cara needs to buy \( 3p \) packages of erasers. Consequently, the total number of erasers \( E \) can be calculated as:
\[ E = 4e = 4(3p) = 12p \]
The smallest integer value for \( p \) is \( 1 \) (buying 1 package), which gives us:
\[ E = 12p = 12(1) = 12 \]
Thus, when Cara buys \( 1 \) package of pencils, she needs to buy \( 3 \) packages of erasers, resulting in a total of:
\[ E = 4 \times 3 = 12 \]
Therefore, the smallest number of erasers that Cara can buy is \(\boxed{12}\).