  This step of the argument appeals to externalism about mental content (Putnam 1975, Burge 1979), specifically some sort of causal covariational theory (see the entry  externalism about mental content). Putting the basic idea crudely: after a while on Inverted Earth certain of your inner states that on Earth were reliably caused by the presence of red things and thereby represented redness will instead be reliably caused by the presence of green things, and thereby will come to represent greenness.