Tut, tut, tut. That was not Ayn Rand's advice.
Rand believed that our moral obligation is to ourselves and those to whom we freely obligate ourselves [family primarily.] If everyone followed that advice, society would be in much better condition.
Or, as my 88 year-old mother has told me all my life: Charity begins at home.
Now, once you have provided for yourself and your loved ones, then helping others, Rand said, is a demonstration of man's humanity toward man.
P.S.: Mom's never read a word of Rand's.