It's amazing to me how much effort people invest in elaborating wrong answers.
The key insight here is to remember that time moves the same for both Mary and Ann. Let's call the number of years between past and present X. Then
24 - X = 12 + X => 24 - 12 = 2X => X = 6.