If one paper cites the other then it is almost certainly fine. Relax. Any reader finding B will also be able to find A making the complete context available.
Without a citation it would depend on what the sentences say. Plagiarism is about ideas and it would probably be hard to capture a complete idea in a couple of sentences in a way that resulted in plagiarism, but it is possible.
Let me emphasize that plagiarism is about the ideas, not the specific words to express them. It is possible to commit plagiarism, including self plagiarism, using none of the original words. For a scholarly paper, self plagiarism occurs when you include ideas that you have published previously without citation, giving the impression that they are new in this paper. It has the effect of cutting off a reader of the current paper from the complete context of the ideas and how they arose.
Also note that most people, when writing about similar things, are likely to use similar phrasing. We tend to fall into patters of language. I'll guess that is all that is happening here.