puzzles - there are two boxes with some marbles in them if a marble from box1 is placed into box2 then box2 will have double the number of marbles as in box1 if this process is reversed then both boxes will have same number of marbles how many marbles ar - skillgun

Let's assume that the box-1 is having H marbles and box-2 is having C marbles. C + 1 = 2 * (X-1)
C + 1 = 2H - 2
C = 2H - 3
Also,
C - 1 = H + 1
C = H + 2
=> 2H - 3 = H + 2
H = 5
=> C = 7