Let the age of Dan be 'X' years.
Then, age of Cary = 'X+9' years
According to question:
5 years Later:
Dan's age = 'x+5'
Cary's age= 'x+14'
Sum of their ages = 83
(x+5)+(X+14) = 83
2x+19 = 83
x = 32
Therefore, Dan's age = 32 years
Cary's age = 41 years