Joe is 12 years older than Ruth. so Joe will be twice Ruth's age when Joe will be 24 years old and Ruth will be 12 years old. It will happen in two years.
Let x is the number of years under the question. Then 22 + x = 2*(10+x) 22 + x = 20 + 2x 22 - 20 = 2x - x ====> x = 2, and you have the same answer.