"To the ger in your gates shall you give it": We are hereby taught that he gives it as a gift to a ger toshav (a "resident stranger" — one who has taken it upon himself not to serve idolatry, but who eats carcass.)

Whence is it derived (that he may give it) also to a gentile? From "to the gentile."

And whence is it derived that he may sell it to a gentile? From "or sell it to the gentile."

And whence is it derived (that he may sell it) also to the ger? From "to the ger." In sum: He may sell it or give it as a gift both to a gentile or a ger toshav.