Simply put, cooperation/helpfulness puts you at a disadvantage if it is not reciprocated.
The error here is assuming that "groups" necessarily fall along racial lines.
It does when appearance and affiliation are one.
It is, because in a society that has racism as status quo, you can be sure that these superficial characteristics are shared between you and your immediate, as well as extended family - people who you can rely to be in your group.
My argument isn't much changed if you recast it as the generalization from family to "race" being incorrect, because races aren't actually coherent groups in the same way that many (extended) families are.
Exactly. And in a traditional society, you can be pretty much sure that your extended family is of your race.