By taking advantage of strangers' desperations? The means matter. Honor matters. A gift given at the cost of someone other than yourself is less than what it could have been. It was kind of you to do that for your mother, and I'm sure seeing her smile was beautiful, as it is to me when my loved ones are happy, but did you not still take advantage of someone for that to happen?
It may come down to one's view of fellow people. I, personally, feel that I do not need to know someone to value her. The fact that she is alive is enough of a reason to look out for her wellbeing; I try to view everyone as a friend until proven wrong. There will come times when you feel that you have no choice but to forfeit someone's wellbeing for that of another, more-intimately related individual. But I would urge you, in these moments, to entertain alternatives, such that everyone can make it out happy. There is always another way, even if you can't immediately see it. To me, taking advantage of others is a matter of expediency.