In his introduction to Parshat Vayechi, Rabbeinu Bachya says the following regarding charity (Munk translation):
“The subject matter of charity, how to practice it, and in what amount to practice it is quite complicated; the fundamental ingredient of doing charity is that one gives to someone else something which belongs to one. There are many ways of doing this. ... based on Exodus 22,24 “the poor person who lives amongst you.” A poor person residing in your house takes precedence in his claim on your charity over someone who lives out of town. A poor person who is also a next of kin takes precedence over another poor person of your hometown. The relevant verse in Isaiah 58,7 states: “do not ignore your own kin.” A still higher level of charity is to provide one’s children with a livelihood.”
I remember being taught something to this effect in cheider too.
Is there a classical source from the Talmud or Midrash for this idea?