2 occurrences across the corpus

The Babylonian Talmud

Babylonian Talmud Makkot 2:57

"Everyone gets exiled for killing an Israelite accidentally, and vice versa] except through [killing accidentally] a foreign resident." Therefore, a foreign resident is [considered] an idol worshiper! But read the end [of the Mishnah]! "A foreign resident is exiled on account of [killing accidentally] a foreign resident [which would imply that they aren't like idol worshipers as they actually get exiled]! Rav Kahanah said: This is not a difficulty. Here [where the punishment is exile] is where a foreign resident kills a foreign resident, and here [where he does not get exile] is where a foreign resident kills an Israelite.

Babylonian Talmud Makkot 2:58

Some say that they contrasted the two verses together. It's written: "For the children of Israel, and for the foreign resident in your midst there shall be six cities" (Numbers 35:15). And it is written: "There shall be for you all cities of refuge" (Numbers 35:12)—for you—not for the resident foreigners! Rav Kahanah said: This is not a difficulty. Here [in the second verse] is where a resident foreigner killed an Israelite, and here [in the second verse] is where a resident foreigner killed a resident foreigner.