You can put this solution on YOUR website! The age of A is twice that of B.
a = 2b
:
8 years hence their ages will be in the ratio 5:3. =
Cross multiply
3(a+8) = 5(b+8)
3a + 24 = 5b + 40
3a = 5b + 40 - 24
3a = 5b + 16
replace a with 2b, (from the 1st statement)
3(2b) = 5b + 16
6b - 5b = 16
b = 16 is B's age
:
I'll let you find A's age, check your solution in the 2nd statement