First of all this question makes no complate sense if this was in real life. But the answer is: Allen is 23 years old and Jim woukd be 12 1/2 years old.
Step-by-step explanation:
Because 20+3=23. That's because it said in 3 years. Tthen we divide by 2 to find Jim's age. That's because it said that in three years, Allen would be twice as old as Jim.
The requirements set by this problem aren't possible to meet simultaneously. You can do your algebra for each one and find an answer. In this case, I found that the age of Jim was 23, and Allen 43, but those ages do not match the criteria of Allen being 2 times as old as Jim. Your teacher gave you a problem without remembering that both of the people in the problem are aging at the same time. That's the only possible explanation I have for this problem.