Lily has my boys doing this too but only when they are on leads and in the vicinity of the house. To be honest the more dogs you have the more likely this problem is to occur -- two for me was easy to manage and the boys never barked at dogs; once I added in three if one starts, all the others join in. That means a lot more barking than when I only had two. Lily is just really excitable and starts barking at other dogs and cats too. It's one of the reasons behaviourists say, don't get a second dog with the intention of having a second help stop the first one's bad habits... each new dog can recalibrate the behaviour of all the dogs; and dogs tend to learn bad habits from each other as easily as good habits.
I've asked a few trainers about this issue and the hard answer to the general issue of stopping it is: each dog really has to be worked with separately. If each one on its own is reliably focusing on you, eg to the 'look' command, and gradually desensitised to other dogs, then you can work up to two and then three walked together. But this is hard and doesn't always work as the dynamic with three is just so different and (speaking from personal experience) harder to manage when you are walking them on your own in particular.
A variation on this that I have to deal with is that if I walk all three together they pull like sled dogs. I can work each separately to walk politely, and two together are manageable, but the three together are really difficult to manage as far as pulling goes. Tara and Lisa have told me this is indeed very hard to manageonce you put three together, if they are pullers. To get around his problem, I walk the boys on no-pull harnesses as Lily is so small and doesn't pull as much (though I am getting her a no-pull harness too anyway). Obviously it is an easier issue to manage than the barking as there's a tool you can use.
Usually you can work on the barking bad habit by focusing on the instigator as if that dog doesn't start, the others are less likely to chime in -- in this case, Sam. I'm not sure if his hearing is that great for trying to get him to look though.
This is a real hassle, I know, but it is just how dogs tend to start interacting and influencing each other once you get more than two and start forming a real pack.