Great catch, arushi118 — this is actually one of the most common traps on GMAT PS, and you're thinking about it exactly right.
You're correct that x = 2, y = 10 also satisfies 2.5x + 3.5y = 40. So does x = 9, y = 5. With one equation and two unknowns, there are infinitely many solutions in theory. On its own, this equation is underdetermined — a concept the GMAT tests frequently.
Here's why the answer is still D (9:5): look at what the question is actually asking. It gives you five specific ratio options. The GMAT is telling you that only one of those ratios produces a valid whole-number solution (since you can't buy 2.3 chocolates).
Let's check both integer solutions:
- x = 9, y = 5 → ratio = 9:5 → appears as option D ✓
- x = 2, y = 10 → ratio = 1:5 → NOT in the answer choices
So x = 2, y = 10 is a valid algebraic solution but doesn't match any answer choice, which eliminates it in a PS context. The answer choices themselves act as an additional constraint, narrowing the solution space when algebra alone won't give a unique answer.
The common trap: students try to solve this purely algebraically, see multiple solutions, and panic. But in PS, if the question has multiple valid setups yet only one answer choice survives, that's your answer.
Takeaway: On PS questions with underdetermined systems, never forget that the five answer choices are part of the problem — treat them as a constraint, not just a final check.