Explanation:
I just answered this.
the key is that ALL current labels are wrong. not "could be wrong", but "definitely wrong".
you need to pick an apple from the originally "red/green" labeled bag.
since that label is wrong, it must be one of the pure color bags.
so, that bag gets the label for the color that we picked.
now we look at the other 2 bags. they are both wrongly labeled, but there are only 2 options : the second color (which we did not use to label the first bag) and "red/green".
the bag with the color label we just assigned to our first bag must therefore get the second color label (if it were "red/green", it would mean that the third bag was actually correctly labeled, which was not the case), and the bag currently with the second color label is the actual "red/green" bag.