I know what you're saying because I get this too myself, and has been lessened as of late.
Your only choices in my opinion, are to self reflect on this issue and question why it is that the nerves are causing you to feel this way ( I would bring in something biological but I know that it has nothing to do with predisposed wiring or having to eat certain foods to counteract this ), so for example, when I was at the train station 3 days ago, I noticed a person who had been ridiculously bullying me since High School, and the sudden onset of flight of fight had occurred.
Why was this the case? usually because the conditioned fear and interactions we have with others we don't get on well with, causes us to interpret the existence of them infront of us as a stressor and not as the expected social interaction, thus the fight or flight, since we wouldn't know what they are about to do now.
Therefore, when this arises, you would have to look at this introspectively, and not based on whims, since basing it on whims, only makes it worse in the future for you, in comparison to what I mentioned in the former, as introspection, slows your thought process and clearly details, why it is that you fear them, and from that your solutions will arise, since usually the brain doesn't go without any solutions in my honest opinion.
Thus, when you are questioning yourself on this issue, you would have to assess, whether it truly is a threat to you or not, as the other person might forget you, or is in a different position themselves to even care or just wants to know how you're doing and had forgotten all their ills against you. You should also be questioning the fear and whether it's necessary, or in fact whether your fear of them is necessary towards what you have aimed to do outside, since the latter should be your main mode to think in, as this means instead of fearing the other person, you are to be focussed on what your intended desire to be outside is. Meaning that this other person you know outside, isn't of importance to you and isn't something to worry about, unless, it becomes to the point that they end up being a threat or time waste you, to which you would have to come to the conclusion on how to deal with that.
You could take substances to ease your social anxiety, though I would much rather favour introspection, than coping with substances that will compound on you with their side effects the more you do them, since the way I approach things is, if a problem arises within me, the only solution is me and nothing else, but if it ends up being something biologically caused, as in you were born with a defect/disorder, then you should consider external actions/substances. Likewise, any problem caused by someone else or something, should be dealt with externally i.e. punching the other person back that had punched you or looking after your gut, when you experience gluten issues that create inflammation.
What if they try and talk to me?
If this is your main worry, then you should really be questioning, whether this is something to fear, since what they might try to talk to you isn't something definite, to which you realised, so to worry about something they are going to say, when you don't know what they are going to say is impractical and silly, further increasing unneccesary stress for you ( trust me I know this feeling, and I do get it time to time but I still question, even when the likely topics that others bring up occurs ), therefore it would be best if you just calmed down and assess the situation again.
If they do talk, just simply say hello and that you're in a rush to do something, which usually is respected and they go off on their own way, whilst you do what you need to do. If they state they would like to talk to you on certain occasional topics, then I guess you could respond to what they say, pause and tell them you have stuff to do.
Otherwise, just find a different route and head that way or do what I do and cover myself as much as possible so they don't detect you. Always works in regards to meeting family members ( I don't ever like interacting with them ) apart from mum and dad or anyone I know in general outside.
Your main goal is to go outside and finish what you wanted to do; all these obstacles in your way are pointless, thus sort them out by avoidance and with no fear intertwined.
Forgot to note but, by assessing and questioning the scenario, you should manipulate the entire thing to ensure you come out of it, than being stuck in it