Yvonne is 12. Xavier is twice as old as Yvonne was when Xavier was as old as Yvonne is now. How old is Xavier?
The answer given is: Xavier is 16.
How is this word problem converted into algebra? What is your reasoning to arrive at such algebra equations?
This "Puzzle" comes from the book "Theta Mathematics" by David Barton. 2011 edition. Page 224. This is not a homework problem. I just study maths for the fun of it.

Xavier is some age $X$, Yvonne some age $Y$. When Xavier was as old as Yvonne is now, he was 12. So Xavier's age is 12 plus some other number of years, say $X = 12 + a$ years. So when Xavier was 12, that was $a$ many yeas ago, meaning Yvonne was $12 - a$ years old at the time.
So Xavier is twice as old as that, says the question. Therefore $$ X = 2 (12 - a) $$ but we know already that $X = 12 + a$, so $$ 12 + a = 2 (12 - a) \\ \implies a = 12 - 2a \\ \implies 3a = 12 \\ \implies a = 4 $$
So $X = 12 + a = 12 + 4$, meaning $X = 16$.