The passuk in Devarim 10:17 says Hashem
doesn’t play favorites. Yet, Rashi on Arami Oved Avi (Devarim 26:5) says that by nonjews, Hashem considers their evil plan as if they did the evil act (as opposed to by Jews). Likewise, says the Yerushalmi Peah 1:1, Hashem treats the good plan of Jews as if they did the good act (as opposed to by nonjews). Why isn’t this favoritism?