Your question is Alternate Printing With Threads. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
Suppose you have two threads t1 and t2, where t1 prints table 2 and t2 prints table 3; write a program that prints 2,3,4,6,6,9,8,12... (alternate tables).