Firstly we need to find out what part of the bag are the red, green and blue marbles alltogether. To do that we may look for the common denominator and check how far away will the result be from 1 (whole content of the bag).
1 - (1/2 + 1/4 + 1/5) =
= 1 - (10/20 + 5/20 + 4/20) =
= 1 - 19/20 =
= 1/20
It means that remaining 2 white marbles are 1/20 of the bag's contents. And if 1/20 of the bag is 2, then:
10/20 of the bag = 2 * 10 = 20 red marbles
5/20 of the bag = 5 * 2 = 10 green marbles
4/20 of the bag = 4 * 2 = 8 blue marbles
Answer: There are 10 green marbles in the bag.
I hope I didn't make it too complex :)