We are given the ratio of candies to chocolates, which is 9:7. It also means that if we have 16 portions, there are 9 portions of candies and 7 of chocolates.
If there were 16 portions, then in 1 portion there would be: 336 items/ 16 portions= 21 items/portion.
As we assume that we have 16 portions, there are 7 portions of chocolates. Therefore, the number of chocolate is: 21 items/ 1 portion* 7 portions= 147 items.
Because we are referring to 7 portions of chocolates, 147 "items" are also 147 chocolates.