If you stumble upon an acquaintance, then it is normal for you to have a short conversation, or perhaps even spontaneously plan to do something together right away. But if there are people with you who don’t know your acquaintance (or anyone who is with them) or people with them who don’t know you (or anyone who is with you), this is, of course, a whole different kind of situation.
What is the most correct way to behave when it happens? Should you say hi to your acquaintance, or a slight smile is sufficient? Should you have even a 10 second long conversation, or is it better to try to avoid it all? And if they try to talk to you (and this is obvious to you that there are people with you who start to feel uncomfortable), what should you do to politely stop them from having a conversation with you?