With a water test kit that you buy at a pet store. Read up on aquarium cycling to learn more about water parameters.
You NEED to separate them before they start fighting and hurt each other. Domestic bettas are like fighting-stock gamefowl, they cannot be kept in groups. Pairs are especially bad, the less aggressive one will be bullied and severely picked on. If you want multiple bettas in the same tank, get a 20 gallon tank and wild-stock bettas, those haven't been selectively bred for aggression like yours have.
If you're going to insist on keeping them together, you need at least a 10 gallon tank, and as many line-of-sight barriers as you can put in. And if you do that, you may as well just get a 10 gallon tank and put a divider in it.
Why do you want to keep them together?
If your pet store told you that you can keep bettas together, they were either lying or misinformed. Chain pet store employees are not to be trusted for any sort of good advice.