It's easier if you write out possibilities.
so three numbers multiplied to get 36:
1,1,36
1,2,18
1,3,12
1,4,9
1,6,6
2,2,9
2,3,6
3,3,4
I think thats everything. Let me know if there are more.
Then we get their sums.
1,1,36=38
1,2,18=21
1,3,12=16
1,4,9=14
1,6,6=13
2,2,9=13
2,3,6=11
3,3,4=10
Now,the second friend would have guessed the ages of his children by now; since the sums (house numbers) are all different. But since he still cannot figure it out, it must be the two sets of numbers (1,6,6 and 2,2,9) that have the same sum.
And finally, since he said "oldest one", the oldest cannot be twins. 1,6,6 is impossible, therefore the ages are 2,2 and 9.