Arthur and Bert each writes down a positive integer on a piece of paper and then shows it to Charles. Charles then writes two numbers on a blackboard, visible to Arthur and Bert: one of them is the sum of Arthur's and Bert's numbers, and the other is a random number.
After this Charles asks Arthur if he knows Bert's number. If Arthur says he doesn't know, then he asks Bert if he knows Arthur's number. If Bert says he doesn't know, Charles continues with Arthur, then if necessary with Bert and so on... until he gets a positive answer.
When will Charles get a positive answer?
It is almost easier, I think, to look at this from the point of view of somebody who doesn't know either number.
Let's consider the case under discussion, where X = 13 and Y = 16.
Note that X - Y = 3.
If A says no, then we know that A is between 1 and 12. If he was 13 or over, he could deduce B's number straightaway.
If B says know, we know that B is between 4 and 12. Knowing that
A was between 1 and 12, B could deduce A's number if he had a 1, 2 , or
3.
If A says no again, then we know that A is between 4 and 9. (Note
that we have narrowed the range by three on each side). Knowing
that B was between 4 and 12, A could deduce B's number if he had 1, 2,
3, 10, 11, or 12.
If B says no again, then we know that B is between 7 and 9. (Note that
we have narrowed B's range by three on each side). Knowing that A
was between 4 and 9, B could deduce A's number if B had 4, 5, 6, 10,
11, or 12.
A will not say no a third time.