Explanation
Let A's current age be x and B's current age be y.
Since A is twice as old as B, x = 2y.
Three years ago, A's age was x - 3 and B's age was y - 3.
Since A was three times as old as B, x - 3 = 3(y - 3).
Solving the equations, we get x = 12.
So, the correct answer is 12 years.