If Bob’s number isn’t a divisor of 50, then 50 must be the sum and Alice will know her number. If Bob’s number is 50, then 50 must be the product and again Alice should know her number. She doesn’t, so Bob’s number must be a proper divisor of 50, that is, 1, 2, 5, 10, or 25.
By the same reasoning, if Alice’s number isn’t a proper divisor of 50 then Bob should know his number. Also, after Alice’s utterance Bob can infer that his own number is a proper divisor of 50, following her thinking above. So each number is a proper divisor of 50.
Now, if 50 is the sum of the two numbers, then both numbers are 25 (as 25 + 25 is the only way to combine two of the candidate divisors to get 50). This means that if Alice’s number isn’t 25, then Bob can conclude that 50 is a product and can infer his own number. The fact that he can’t do this shows that Alice’s number must be 25 (and Bob’s number is either 2 or 25).
(Via Matvey Borodin et al., “It’s Common Knowledge,” Recreational Mathematics Magazine 6:12 [December 2019], 9-32.)