Well, you take 4D+8=64. If you subtract 8 from each side, you will end up with 56. Now, the problem is 4D=56. You divide 4 on each side. It will be as so, D=14. (D is for Dan)
Now, you take Cary which will be C. You use 14 and add 4 to it. You will get 18.
Therefore, Cary must be 18 while Dan is only 14.