Question 1196875
<font color=black size=3>
x = amount in box A in the beginning
150-x = amount in box B in the beginning
This is because x and 150-x add to 150 marbles total
x is some positive whole number.


Now take 1/3 of the marbles in box A.
So we'll take 1/3 of x to get (1/3)x or x/3
This amount gets subtracted from the amount in box A
x - (1/3)x = (2/3)x


So if we dump 1/3 of the contents of A, then we're left with 2/3 of the original contents as the remainder.


The amount x/3 is then transferred to box B
So we'll add it to the (150-x) mentioned earlier.
(150-x)+x/3
450/3 - 3x/3+x/3
(450 - 3x+x)/3
(450 - 2x)/3
This represents how many marbles are in box B after adding on the x/3 amount. This is before the 12 marbles are taken away.


Then we take away 12 marbles from box B. I'm assuming these are just tossed aside and not placed in box A (since the instructions don't mention these 12 going to box A)


We'll subtract 12 from the previous expression
(450 - 2x)/3 - 12
(450 - 2x)/3 - 36/3
(450 - 2x - 36)/3
(414 - 2x)/3
This is the final marble count for box B. This is twice as much compared to what's in box A, which was (2/3)x



Amount in box B = 2*(amount in box A)
(414 - 2x)/3 = 2*(  (2/3)x  )
(414 - 2x)/3 = (4x)/3
414 - 2x = 4x 
414 = 4x+2x
6x = 414
x = 414/6
x = 69 
At the start, there are 69 marbles in box A and 150-x = 150-69 = <font color=red>81 marbles in box B</font>



------------------------------------------------------------


Check:


69 marbles in box A at first
81 marbles in box B at first


1/3 of 69 = (1/3)*69 = 23 marbles taken out of box A and moved to box B
69-23 = 46 marbles in box A now (i.e. (2/3)*69 = 46)
81+23 = 104 marbles in box B now


Now take 12 away from box B
104 - 12 = 92
As mentioned before, I'm assuming these 12 are tossed aside and not placed in box A.


We have this
46 marbles in box A
92 marbles in box B
The ratio of which is 92/46 = 2
Which shows 92 = 46*2, i.e. the amount in B is twice of that compared to A.
The answer has been fully verified.



------------------------------------------------------------



Answer: <font color=red>81 marbles</font> in box B in the beginning
</font>