There are 33 students in the class. Before Christmas, they went to the forest with the gamekeeper to fill the feeders. The girls unpacked the hay packages. The boys split into two groups: some took 4 bags of carrots and 3 bags of nuts, and the others took one bag of apples and one bag of nuts. The ratio of the number of girls, boys from the first group, and boys from the second group was the same as the ratio of the number of bags of nuts, apples, and carrots.

How many girls were in the class, how many boys carried bags of carrots, and how many carried bags of apples?

(M. Mach)
Let the number of girls be denoted by $d$, the number of boys with carrots by $x$, and the number of boys with apples by $y$. Then the number of bags of nuts is $3x + y$, the number of bags of apples is $y$, and the number of bags of carrots is $4x$. The equality of the ratios of the quantities given in the problem is

$$
d: x: y = (3x + y): y: 4x \text{.}
$$

From this, we can express the ratio between $x$ and $y$:

$$
\begin{aligned}
\frac{x}{y} & = \frac{y}{4x}, \\
4x^2 & = y^2, \\
2x & = y,
\end{aligned}
$$

keeping in mind that all unknowns are positive numbers. Substituting into the initial equation, we get:

$$
d: x: y = 5x: 2x: 4x = 5: 2: 4 \text{.}
$$

From the problem, we also know that $d + x + y = 33$. We are thus trying to expand the ratio we just found so that its terms sum to 33:

$$
d: x: y = 15: 6: 12
$$

There are 15 girls, 6 boys with carrots, and 12 boys with apples in the class.

Evaluation. 2 points for determining the ratio of boys with carrots to boys with apples; 2 points for obtaining the ratio of girls, boys with carrots, and boys with apples; 2 points for the correct answer.