What is the difference between "Lo Soneh" and "Lo SIlchatzenu"?
Rashi, Rashbam and Targum Yonasan: The former refers to refers to taunting him (oppressing him verbally) 1 the latter, to harming him financially by robbing him (of his property
Why does the Torah mention specifically a Ger?
Rashi: Because if you taunt him, he can point a finger at you and remind you that you too, were strangers in Egypt. 1
Rashi (23:9, citing Bava Metzi'a 59b): It is because 'Suro Ra' - his source is evil. 2 Perhaps he will return to his evil ways.
Ramban #1 (citing Ibn Ezra) and Rashbam: Remember that you too, were strangers in Egypt (and how much you suffered as a result)! 3
Ramban #2: Refer to 22:20:3:2.
Rashbam: Because, having no close relatives to take his part, he is vulnerable. 4
What is the connection between not oppressing a Ger and the fact that Yisrael were strangers in Egypt?
Ramban #2: The Torah is issuing a warning here against thinking that, because a Ger has nobody to support him, he is helpless and therefore one may take advantage of him and oppress him at will. Not at all! One should remember how we were strangers in Egypt and how Hashem rescued us when we cried out to Him for help, 2 because it is His way to always help the underdog. 3 Consequently, if we oppress the Ger and he cries out to Hashem, He will defend him too.
One does not comment on the blemish in somebody else if one possesses the same blemish (Rashi).
And the same reasoning extends to the widow and the orphan, as the Torah indicates in Pasuk 22 (Ramban). In fact, the Seforno, connecting this Pasuk with thr following Pasuk, presents the same explanation as the Ramban with regard to Yasom and Almanah.
Why is this written right after idolatry?
Hadar Zekenim (20): If a Nochri served idolatry and converted, do not verbally pain him for what he did, for everything was pardoned.