There are 50 marbles in a box which has a mixture of white, red and blue marbles. There were originally 20 white marbles and an equal number of red and blue marbles. Jack removes a number of marbles equal to double the difference between the number of white marbles and the number of blue marbles. How many marbles are left in the box?
20 of 50 marbles are white so there are 50-20 = 30 red and blue marbles.
The number of red marbles and blue marbles is the same, so there are 30/2 = 
<gadget id="calculator">30/2</gadget>
<output>15</output>
15 of each color.
The difference between the number of white marbles and blue marbles is 20-15 = 
<gadget id="calculator">20-15</gadget>
<output>5</output>
5.
Double the difference is 5*2 = 
<gadget id="calculator">5*2</gadget>
<output>10</output>
10 marbles
10 marbles are removed to leave 50-10 = 
<gadget id="calculator">50-10</gadget>
<output>40</output>
40 marbles.

<result>40</result>