Mary is 24.
Mary is twice as old as Ann was, when Mary was as old as Ann
is now.
How old is Ann?
Let A = Ann's age now
Let y = the number of years ago it was when Mary was Ann's present age, or A.
Then y years ago, Mary was 24-y and she was also A, so we set those equal:
       24-y = A 
Also y years ago, Ann was A-y, and Mary's age now, 24, is twice this, so
         24 = 2(A-y) 
So that is the system of equations:
 Solve that system by substitution and get A = 18 and y=6
Answer: Ann is 18.
Checking:  Ann is now 18. Mary is now 24, so 6 years ago Mary was 18, which
is Ann's age now.  That checks.  6 years ago Ann was 12.  Since Mary's age now
is 24, she is indeed twice as old as Ann was 6 years ago.  So the answer is correct.
Edwin
Solve that system by substitution and get A = 18 and y=6
Answer: Ann is 18.
Checking:  Ann is now 18. Mary is now 24, so 6 years ago Mary was 18, which
is Ann's age now.  That checks.  6 years ago Ann was 12.  Since Mary's age now
is 24, she is indeed twice as old as Ann was 6 years ago.  So the answer is correct.
Edwin