Number of apples in a basket riddle

You have six baskets with apples - 10,12,15,20,22,25 (this is how many apples there were in them - 10 in first, 12 in second..).

Some of the apples are red and some are green. After one basket was lost there were twice more red apples than green apples.

How many apples were there in the basket which was lost?

--This was in one of math tests I did and I would love to know how to solve it..

• Hint: 12 and 15 have the same remainder mod $3$. Same goes for 10,22,25... Only 20 is alone... Apr 10, 2015 at 19:44

Total apples $10 + 12 + 15 + 20 + 22 + 25 = 104$
The problem is basically saying that $104 - y = 0 \mod{3}$
This is because we know that $2g = r$ and therefore the total apples must have been divisible by $3$ to get an integer value of $g$ and $r$.
So when you subtract each basket, you need to see if the result is divisible by $3$. When $y = 20$, we have $104 - 20 = 84 = 28*3$. So we know there are $28$ green apples and $56$ red apples after the basket with $20$ apples went missing.
Therefore it was the basket with $20$ apples.