Using second piece of info (product of ages is 36), the children's ages can be:
1, 1, 36; 1, 2, 18; 1, 3, 12; 1, 4, 9; 1, 6, 6; 2, 2, 9; 2, 3, 6; 3, 3, 4
Using first piece of info (sum is equal to the number of wondows), the totals are:
38, 21, 16, 14, 13, 13, 11, 11
Now, the man must know how many windows there are, so he should be able to work out the ages if the number of windows is 38, 21, 16 or 14. But he can't, so the sum of the ages must be 13 or 11, meaning the children are either 1, 6, 6; 2, 2, 9; 2, 3, 6; or 3, 3, 4
When told the youngest child has blue eyes, it means the youngest is not one of a twin, so 2, 2, 9 and 3, 3, 4 are ruled out. Since 1, 6, 6 and 2, 3, 6 are left, and the man hasn't seen his friend for five years, he would only not know about children 5 years old or less. Presumably he knows the mathematician had two children back then (but didn't know their ages), so can conclude there are two children over the age of 5, so the ages are 1, 6, 6