inclusive, yes.
Your answer is not correct.
If it was 2 and 2, then the sum would be 4, and Mr S would know that as the sum is 4, the two numbers are 2 and 2. So the product is 4.
But then Mr P, would also find a and b easily.
But Mr S said Mr P couldn't find it.
The sum is 19 the product 34 and the two numbers are 17 and 2, the only way that the sum of 19 can produce a product under 40 is with 17+2. and 34 only has two other numbers it is divisible by except 1 and itself and these are 17 and 2.