I'm sorry I said nothing to the girl having a panic attack beside me in a bathroom stall during an exam
I'm curious if you even know yourself why you decided to stay quiet?
I was in shock and didn't know what to do.
It seems that you regret not being supportive to the girl in the bathroom.  But understandably, talking with another person in the bathroom can feel awkward. However, you should always show empathy to those experiencing a difficult time.
Don't you think it was awkward and counterproductive for you to talk to me about this?
No, why would I think that? You need to know that you can always show empathy and there should be nothing embarrassing or awkward about caring about others.