They were told the number on one of the hats is the sum of the other two.
After a statement by A that he does not know his number, B declared that he is wearing a hat with number 15 - and indeed he was right.
a. What were the other 2 numbers and what reasoning was applied?
b. What triplets of numbers make such discovery possible?