Although this is not a very difficult questions on equations, it is one with a trap answer. If you do not spend enough time on each of the statements individually, you may not draw up the right equations and test out all the cases. And if you do not do this, you may end up concluding that the statement is insufficient.
You need to be wary of falling into this trap and tread a careful path.
Let the smallest group have x balls, the second smallest group (or second largest) have y balls and the largest group have z balls.
From this, we can say x + y + z = 27. We are supposed to find a unique value of z.
From statement I, we know z = 2x. Therefore, x + y + 2x = 27, i.e. 3x + y = 27.
Remember that x and y are integers since they represent the number of balls. From the above equation, 27 is a multiple of 3 and so is 3x. So, y should also be a multiple of 3.
If y = 3, then 3x = 24 which means x = 8. But 8 is not the smallest. So, y cannot be 3.
Similarly, if y = 6, then 3x = 21 which means x = 7. But 7 is not the smallest. y cannot be 6.
But, when y = 9, 3x = 18 which means x = 6. This means z = 2x = 12. Clearly, this is possible.
When y = 12, 3x = 15 which means x = 5 and z = 2x = 10. This is not possible. It also means that any value of y greater than 12 will also create the same effect. Therefore, we do not have to worry about any other value of y.
So, clearly, statement I alone is sufficient since the only possible value of z = 12. Possible answers are A or D. Answer options B, C and E can be eliminated.
From statement II, y + z = 21. We have two variables in this equation and hence we will not be able to find a unique value of z. Statement II alone is not sufficient.
Answer option D can be eliminated. The correct answer option is A.
Hope this helps!