There are two boxes, box A and box B. Each box contains several balls.

If you move one ball from box A to box B, box B will then have twice as many balls as box A.

If you move one box from box B to box A, both boxes will then have the same amount of balls.

How many balls are in each box?