Help me with this riddle. We have two variables from 2 to 99. Their sum is A. Their product is B. I know A, the other person knows B. We have to get the numbers without asking each other. But I call the other person and say that I have no idea what these numbers can be. The other person tells that he knew for sure that I wouldn't understand the numbers. Then as I hear that he knew I wouldn't get the right answer , I say that I understood the answer just now. Hearing me the other person says the same. How is this possible? 
 A: The only way A can know the numbers at the beginning is if they are $(2,2),(2,3),(98,99),(99,99)$.  If the numbers were $(4,6)$ or $(3,8)$, for example, $B$ would know the product was $24$ and would know that $A$ doesn't know the numbers.  Therefore $A$ cannot determine the numbers from $B$'s remark.
I suspect the first remark is supposed to come from the person who knows the product.  In that case, the link  lab bhattacharjee gave has the solution.
A: Say the numbers are 3 and 4.
Your friend Joe gets 12 and he does not know whether the numbers are (2, 6) or (3, 4).
But he knows you either got a 7 or an 8, so he knows that either way you are not sure and he tells you that.
You got a 7 and you know that he either got 10 (2, 5) or 12 (3, 4).
Joe did not tell you he knows the numbers, so it's not a 10, so it's (3, 4).
You tell Joe you know the number.
Joe deduces that if it was (2, 6) then you have 8 which could be (2, 6), (3, 5) or (4, 4).
You would know that Joe did not get (3, 5) or he would tell you he knows the numbers.
But Joe realizes you could not know if it was (2, 6) or (4, 4), so you still did not know.
So Joe now knows you got a 7 and he realizes the numbers are 3 and 4.
