Did Lore and B4 ever know each other? Lore knew Data as his younger brother but did he ever come to know his older brother?
It's likely that he did, but he didn't consider B4 a "brother"
Actually, Data and Lore have three older "brothers", B4 and two unnamed Androids. These androids are referred to as prototypes by Soong's wife and co-worker:
JULIANA: How do you know the same thing won't happen? Creating a stable positronic matrix is very tricky. Your father lost several prototypes before Lore.
DATA: I was not aware he created other androids before my brother.
JULIANA: There were three of them. They were like children to us.
The dialogue in TNG: "Brothers" indicates both that Lore is aware of Soong's previous failures, and that he doesn't count them as real Androids like him and Data:
LORE: Good old Often Wrong Soong. A joke, brother. Actually, he was a genius by human standards.
DATA: But he had destroyed his own reputation by making what seemed wild promises about his positronic brain design, almost all of which failed.
LORE: Promises he later proved to be true. Which made you and me possible, brother. Our beloved father.
Even though we have no canon confirmation, it is difficult to believe that Lore knew about Soong's previous attempts and failures to build an Android and not knowing or at least suspecting that some of these previous attempts have been actual Androids.
It's likely he "inherited" his attitude for treating his older "brothers" as nothing more than prototypes from his father - in TNG's "Brothers", Soong also considers Lore as being "the first":
LORE: I would have proven myself worth to you, if you'd just given me a chance. But it was easier just to turn your back and build your precious Data.
SOONG: You were the first. You meant as much to me as Data ever did, but you were unstable. The colonists were not envious of you, they were afraid of you. You were unstable.
We know memories can be extracted from a positronic brain (Data to B-4, Lal to Data). And we know Data (or at least Starfleet) had custody of Lore after his deactivation. Thus it stands to reason that if Lore was aware of B-4, someone in the Federation would've begun a search for him before Shinzon's storyline.
The risk is that positronic brains can also be wiped (Data not remembering Juliana Soong), so it's possible Soong might have "restarted" Lore's memories after activating Lore and before shutting down B-4.