Answer or Solution :
1. This "Selling Chocolates" puzzle is an interview question.
2. The answer is 210
3. Let us assume that John and Peter had "X" number of chocolates each of them initially.
4. Money earned by John when he sell chocolates separately is (Total chocolates with John)/(Number of Pieces per Rupee)
5. Money earned by John is X/2 as he sells 2 chocolates per rupee.
6. Money earned by Peter when he sell chocolates separately is (Total chocolates with Peter)/(Number of Pieces per Rupee)
7. Money earned by Peter is X/3 as he sells 3 chocolates per rupee.
8. The total money earned by both of them by selling chocolates separately would be (X/2)+(X/3).
9. Now let us find out the equation for money earned if they sell chocolates together at 5 pieces per 2 Rupees.
10. We know each have "X" number of chocolates, so the total number of chocolates that both have is 2*X.
11. They sell 5 chocolates per 2 Rupees and hence every 5 chocolates is considered as one piece sold for 2 Rupees, which is 5/2.
12. Hence, total money earned in combined manner is (Total chocolates with John and Peter)/(5 Pieces per 2 Rupees)
13. It is given as (2*X)/(5/2)
14. Now the equation becomes (X/2)+(X/3)=(2*X)/(5/2)+7 as there is 7 rupees short when they sell chocolates in combined way.
15. Solving the above equation for "X" gives the number of chocolates each of them had initially, which is 210 chocolates.