I've had that situation happen a few times, and I've gotten three results. Similar set ups, all with girls on a school campus. The first one in high school was like yours, I ignored her, but I was walking by so it's not like she came to where I was.
The other two were in college. One I asked what was wrong, since she looked really sad, she told me what was going on, and I tried to help her the best I could, then she had to go to a class. She really appreciated me talking to her, so that felt nice.
The third incident, another girl, I figured since last time was such a success I asked her what was wrong. She flat out said none of your business, so I said sorry and walked away. To be fair, she didn't look very sad, just angry and irritated, so I guess I shouldn't be too surprised about how she responded.
I can't blame you for not doing anything, as dealing with the emotions of people you don't know is pretty weird. Even if I didn't like being told "it's none of your business" it's the truth, it is none of my business. If you feel bad, next time try to talk to the person in question, even if they aren't receptive of your aid, at least you can say you tried.