Here is a solution from Tony Cardell, State College Area High School, Pennsylvania, USA. Chi Kin from St Dominic's International School, Lisbon also solved this one.
When the age of person A is less than half the age of person B, there will come a time when the ratio of the ages B/A is an integer. As the younger person ages, the ratio of the older to younger persons ages decreases, approaching, but never reaching one as long as they live a finite number of years. Therefore the last time the ratio of their ages is an integer, is when that integer is 2.
Therefore for the first part of the problem we must have n-2 = 2 and n = 4. Then, setting up equations that show the relation between the ages over m years, writing x as the father's age and y as the daughters age, we have:
x = 4y
x+m = 3(y+m)
x+m2 = 2(y+m2).
From the first two equations we y = 2m.
From the third equation x = m 2 + 2y. Using the first equation to eliminate x we get 2y = m 2 . Finally we put the equations 2y = m 2 and y = 2m together(substitute the first in the second) and get 2(2m) = m 2 , so 4m = m 2 giving m = 4.
Then, since we know this, we go back to our previous equations and plug in the value m = 4, to get y = 8, so x = 4(8) = 32. Therefore in the first part of this problem, my age is 32 years (check it, it works).
Now suppose there is some wishful thinking in the above assertion and I have to admit to being older, and indeed that I will be an exact multiple of her age in m 3 years. How old does this make me??
Now for the second part of the problem, so as not to do as much math, we will assume that in m 3 years, when your age is the exact multiple (n-3) times your daughters, that this is the last time your age is an exact multiple of your daughters. Now since this is the last time, n=5 (because we are assuming n-3 = 2) (The extra math deals with the fact n cannot = 6 or greater).
Now, solving just like we did in the previous equations:
x = 5y
x+m = 4(y+m),
x+m 2 = 3(y+m 2 ),
Substituting x = 5y in these equations:
5y + m = 4y + 4m,
y = 3m,
5y + m 2 = 3y+3m 2 ,
2y = 2m 2 ,
y = m 2 .
Equating the values of y:
3m = m 2 ,
m = 3.
Hence y = 9 and thus x = 5, so I am 45 years old. Checking to see if this works, 45 is 5 times 9 (true). In 3 years I'll be 48 and my daughter will be 12 so I'll be four times her age. In 9 years I'll be 54, exactly three times my daughter's age and in 27 years time I'll be 72 and she will be 36 so I'll be twice her age.