Then the ratio of the sum of the number of small classes and large and medium classes is 2: 9.
Because the small class gets half of the apples, the small class gets as many apples as the big middle class.
So this is an inverse proportion problem.
Then the large category and the medium category each get 2 * 9/9 = 2.