The bag contains 2+4+2=8 marbles in total.
We are going to find a probability of the opposite event: drawing marbles of same color.
There are three possibilities:
1. Drawing both green marbles
2. Drawing both yellow marbles
3. Drawing both red marbles
The probability of drawing both green marbles:
The probability of drawing both yellow marbles:
The probability of drawing both red marbles:
So, the probability of drawing marbles of the same color is:
Now, the probability of drawing marbles of different colors is: