1. P says "I don't know the numbers".
S says "I don't know the numbers".
2. P says "I don't know the numbers".
S says "I don't know the numbers".
3. P says "I don't know the numbers".
S says "I don't know the numbers".
4. P says "I don't know the numbers".
S says "I don't know the numbers".
5. P says "I know the numbers".

>From 1. P has an ambiguous product, which might be
36 = 9x4 = 6x6, 24 = 8x3 = 6x4, 18 = 9x2 = 6x3, 16 = 8x2 = 4x4,
12 = 6x2 = 4x3, 9 = 9x1 = 3x3, 8 = 8x1 = 4x2, 6 = 6x1 = 3x2,
or 4 = 4x1 = 2x2.

By the time P has made his announcement, S has considered all the
possible addends which might form his sum, and has considered all the
products of those addends, yet he also does not know. So S has a number that has addends which when multiplied form more than one of the possible
ambiguous products. Such sums are
5 = 4+1 (product 4) or 5 = 3+2 (product 6)
6 = 4+2 (product 8) or 6 = 3+3 (product 9)
7 = 6+1 (product 6) or 7 = 4+3 (product 12)
8 = 6+2 (product 12) or 8 = 4+4 (product 16)
9 = 8+1 (product 8) or 9 = 6+3 (product 18)
10 = 9+1 (product 9) or 10 = 8+2 (product 16) or 10 = 6+4 (product 24)
11 = 9+2 (product 18) or 11 = 8+3 (product 24)

>From 2. When P learns that S doesn't know, he has already added all the single digit factors of his ambiguous sum and discovered18 but isn't sure whether S has 11 or 9
16 but isn't sure whether S has 10 or 8
12 but isn't sure whether S has 8 or 7
9 but isn't sure whether S has 10 or 6
8 but isn't sure whether S has 9 or 6
6 but isn't sure whether S has 7 or 5

Note that S cannot have 5 for if he had 5 he would be convinced that P has 6.

>From 3. P cannot have 6 for if he did he would be convinced that S has 7.
S cannot then have 7 for if he did he would be convinced that P has 12

>From 4. P cannot have 12 for if he did he would be convinced that S has 8.
S cannot have 8 for then he would know that P has 16.

>From 5. P, who has 16, decides that S has 10 and that the original numbers are 2 and 8.
Be Well!
Dane Brooke