You tried to help that is what counts. I have done the same before with people trying to fill prescriptions and not having the money. Sometimes people will accept your help sometimes not. One thing that seems to figure into it is the age of the person. Older people are less likely to accept cash from a stranger, not because they don't trust you but because they often are too proud too even when it is in their own family.
I went to check on my parents , I check on them about once a month, and opened their refrigerator to find a half gallon of milk, half loaf of bread, some bacon and that was it. They still had over 1 week to go before they got their social security checks. I was angry , why didn't they tell me, I had no idea they had been doing without this way. The response was that they didn't want to bother anyone and that everyone had their own families to take care of. I had told them in the past and helped them in the past when they were having money issues but even though I had done it before they still didn't feel comfortable asking me again. Sometimes you have to almost force help on people.