This was a relatively simple puzzle and the response was again awesome – thanks everyone! The first one to come back with the correct answer was Radhika Goyal from NY. Also got correct answers from Vivek Sheel, Anirudh Baddepudi, Sirisha and Muskaan Mittal. Thanks all, and well done!
When I tried this puzzle with my children, I found it helpful to first do a simpler version of this – assume you have 2 red caps and 1 white cap, and only two people A and B, where B can see A and A cannot see anyone else. If A had a white cap, then B should be able to guess the color of his cap as Red. Therefore, if B has not been able to guess, then A can guess that he must be having a red cap.
The same logic can be extended in the case of 3 red caps and 2 white caps. A can see B and C, and cannot guess his cap. That implies that B and C do not have both White, otherwise C could guess. Now in case B sees a White cap on A, B will be able to guess his cap as Red (otherwise C would have been able to guess). Therefore A knows that his cap must only be Red.
Hope you enjoyed the puzzle!