3. Petya bought one cupcake, two muffins, and three bagels, Anya bought three cupcakes and a bagel, and Kolya bought six muffins. They all paid the same amount of money for their purchases. Lena bought two cupcakes and two bagels. How many muffins could she have bought for the same amount she spent?
3. Answer. 5 cupcakes.

The total cost of Petya and Anya's purchases is equal to the cost of two of Kolya's purchases. If we denote $x, y$, and $z$ as the costs of a cake, a cupcake, and a bagel respectively, we get the equation: $(x+2 y+3 z)+(3 x+z)=12 y, \quad$ from which it follows that $\quad 4 x+4 z=10 y$, \quad that is, \quad $2 x+2 z=5 y$.