The numbers were 2 and 9. And here comes the entire solution.
There shall be two natural numbers bigger than 1. First student knows their product and the other one knows their sum.
The sum is smaller than 14 (for natural numbers bigger than 1), so the following combinations are possible:
2 2 ... NO - the first student would have known the sum as well
2 3 ... NO - the first student would have known the sum as well
2 4 ... NO - the first student would have known the sum as well
2 5 ... NO - the first student would have known the sum as well
2 6
2 7 ... NO - the first student would have known the sum as well
2 8
2 9
2 10
2 11 ... NO - the first student would have known the sum as well
3 3 ... NO - the first student would have known the sum as well
3 4
3 5 ... NO - the first student would have known the sum as well
3 6
3 7 ... NO - the first student would have known the sum as well
3 8 ... NO - the product does not have all possible sums smaller than 14 (eg. 2 + 12)
3 9 ... NO - the first student would have known the sum as well
3 10 ... NO - the product does not have all possible sums smaller than 14
4 4
4 5
4 6 ... NO - the product does not have all possible sums smaller than 14
4 7 ... NO - the product does not have all possible sums smaller than 14
4 8 ... NO - the product does not have all possible sums smaller than 14
4 9 ... NO - the product does not have all possible sums smaller than 14
5 5 ... NO - the first student would have known the sum as well
5 6 ... NO - the product does not have all possible sums smaller than 14
5 7 ... NO - the first student would have known the sum as well
5 8 ... NO - the product does not have all possible sums smaller than 14
6 6 ... NO - the product does not have all possible sums smaller than 14
6 7 ... NO - the product does not have all possible sums smaller than 14
So there are the following combinations left:
2 6 ... NO – it is impossible to create any pair of numbers from the given sum, where there would be at least one sum (created from their product) bigger than 14 (it is impossible to create a pair of numbers from sum 8, so that the product would have an alternative sum bigger than 14 ... eg. if 4 and 4, then there is no sum – created from their product 16 – bigger than 14 – eg. 2 + 8 = only 10)
2 8
2 9
2 10
3 4 ... NO – it is impossible to create any pair of numbers from the given sum, where there would be at least one sum (created from their product) bigger than 14
3 6 ... NO – it is impossible to create any pair of numbers from the given sum, where there would be at least one sum (created from their product) bigger than 14
4 4 ... NO – it is impossible to create any pair of numbers from the given sum, where there would be at least one sum (created from their product) bigger than 14
4 5 ... NO – it is impossible to create any pair of numbers from the given sum, where there would be at least one sum (created from their product) bigger than 14
The second student (knowing the sum) knew, that the first student (knowing the product) does not know the sum and he thought that the first student does not know that the sum is smaller than 14.
Only 3 combinations left:
2 8 ... product = 16, sum = 10
2 9 ... product = 18, sum = 11
2 10 ... product = 20, sum = 12
Let’s eliminate the sums, which can be created using a unique combination of numbers – if the sum is clear when knowing the product (this could have been done earlier, but it wouldn’t be so exciting) - because the second student knew, that his sum is not created with such a pair of numbers. And so the sum can not be 10 (because 7 and 3) – the second student knew, that the first student does not know the sum – but if the sum was 10, then the first student could have known the sum if the pair was 7 and 3.
The same reasoning is used for eliminating sum 12 (because 5 and 7).
So we have just one possibility – the only solution – 2 and 9.
And that’s it.