|It isn't a matter of other hosts communicating with A or B. The switch doesn't care about that. It builds a table of mac address to port number based on when a computers network card first makes a live connection to the switch.|
There are no broadcasts, at this layer, which is where I think your question lays. Broadcasts don't come into play until layer 3 and ip.
I guess you could say a hub broadcasts but that isn't quite right. A hub repeats to all ports. IP does broadcasts.
I hope this helps.
Give a person a fish, they eat for a day. Suggest they internet search and they learn a skill for a lifetime.