The best way is too late for you now, if you leave the broody hen with the layers, right from the get go, it works best. The broody hen gets so mean, that everyone gives her space, and when the chicks hatch, they still give her space, and the chicks quickly learn to keep the mama between them and the layers.
When one separates the broody and chicks (and this is an often recommended practice) the broody hen, herself becomes a stranger to the flock, and weeks later, when it seems like the chicks are big enough, and you try and reintroduce them, the flock sees the broody as a stranger, she had to defend herself, and the hormones have started to drop, and she does not have the drive to protect the chicks like she did when they were first hatched, so as you found out, they attack the little ones too.
In your situation, it would be better to separate the chicks, away until they are nearly full sized. And maybe pull one other bird out of the flock, so that the broody hen could have a friend when you add that pair back to the flock. It is the most difficult integration is adding either a single hen, or smaller birds to the flock.
Mrs K