Question Author
The problem with that approach is that it's sort of cheating -- I 'know' properties of the answer so will assume without proof. It's a more interesting exercise to derive it.
One way of starting on a journey to the solution is to pick a couple of possible pairs and see how the logic would apply to them, or not. We can classify such pairs in the following way: prime and prime; prime and not prime; not prime and not prime. Then:
For two prime numbers p q, the product pq can be easily factorised straight away, so in fact the guy who knew the product would know the two numbers instantly (in this puzzle, one has to assume that the people P and S are fully capable of arithmetic and logic). Hence without any further work, we can see that at least one of the numbers isn't prime.
On the other hand, suppose both numbers are not prime, eg 24 and 45. Their product also admits factorisations such as 12 and 90, 72 and 15, 36 and 30 etc; while their sum also admits a huge range of options. Although this part of the logic turns out to be unnecessary, it also hopefully serves to illustrate that the solution is unlikely to be two non-primes either; for how, in that case, could one extra piece of information -- that the sum was enough to know that the product was inconclusive -- be enough to separate all of the possible options?
It then appears to follow that one of the two numbers is prime, and the other is not. We can do better, and logically prove that this statement is true, but it's enough to hint that there are better ways to solve this puzzle than by exhaustively searching through all of the c. 5,000 different pairs.
I'll post the rest of the solution later.