The disingenuous or mentally lazy immediately suggest that self interest means just whacking everyone else over the head and taking their stuff. That is one absurd extreme. Just a consideration of my personal interest in the division of labor shows how asinine that view is.
Once you agree that your life is your own, meaning your time, your thought, your effort, and the products thereof, then you are done with the political or governmental question. The government, group, tribe, nation, state, whatever, does NOT have any right to the products of your life effort.
That leaves the second question. Morally, what ought you do for the total stranger in need. It is easy to see the rightful self interest in helping a friend or family member return to his/her own self sufficiency. Of course, there too, enabling them to become dependent moochers is NOT helping them. So you have to be careful in discerning what effect your 'help' is having, in every case.
So. The stranger in need -- there can be no other agency to FORCE you to help this person. Morally, his/her life is not 'superior' to your own. The only 'ought' help him/her I can see, is in the value you personally hold for individuals in general - for other human beings in general. Value to YOU. This requires your own personal assessment of what that other person's life, productiveness or no, 'usefulness' or no, has for you. Certainly you ought not be compelled to sacrifice for that person. I think the value of that stranger in need, say an 80 yr old man with no remaining family and no likelihood of returning to any sort of 'productive' enterprise, his value for you is a personal question. Assuming your assistance is carefully considered to not harm him by encouraging a dependency that otherwise would not be necessary, I think your assistance must be voluntary, and should be done. I do not think you should believe you 'owe' that person a part of your life. I think your motivation, if it is there, should still be born out of the idea that you are supporting a value to your self. Yes, it would be the abstract value of a human life, of a world in which the old and incompetent are cared for by people who look and think - you, you are like me, but age or illness or harm has come to you and you can not care for yourself -- you, you are like me, and I will help. This is entirely different than feeling guilt and a sense of owing or obligation.
I think Ayn Rand was right about self interest, but you have to be very careful to think very clearly and effectively whenever you think self interest means skipping past some other human's need. Rational self interest ceases to be self interest when it isn't rational, and that rationality can be defeated by too quick selfish (pejorative sense) whim preoccupation, or lack of information, or lack of insight into the full consequences of the potential actions available, etc.