Miller doesn't really solve the problem of witchcraft in the play. The characters who believe that witchcraft is truly plaguing the town deal with it by hanging those who refuse to confess and repent, and guiding those that do repent back to God. In the end, the entire court is proven to be a fraud, and the trials are ended after the hanging of John, Rebecca, and Martha.
Miller was using the Salem Witch Trials to show the consequences of hysteria and mob-rule. His end goal is not to solve the problem of witchcraft, but rather to show the consequences of letting fear and biases dictate public actions. He was specifically drawing a connection to the McCarthy Trials and the Red Scare.
Arthur Miller is commenting on the behavior of society, comparing the Salem Witch Trials with the McCarthy hearings in the 1950s when the United States Government sought to identify any Americans who were Communists or Communist sympathizers.
He makes it clear that the witch trials pick up momentum from a host of influences, like Thomas Putnam's desire to obtain the land of the accused. He manipulates the opportunity to position himself to purchase Mr. Jacobs land, which lies next to his. He does this by convincing his daughter Ruth to accuse Jacobs of witchcraft.
Mrs. Putnam needs to blame someone for the death of her seven infants, so she puts the charge into a witchcraft accusation and succeeds in exacting vengeance on Rebecca Nurse who is a mother and grandmother to 26. Mrs. Putnam uses the witchcraft hysteria to exorcise her jealousy towards Mrs. Nurse.
Abigail Williams, who is at the heart of the whole witchcraft hysteria, uses the opportunity to try to get rid of Elizabeth Proctor so that she can be united with her former lover, John Proctor.
Miller is making a commentary on the motivation of the accusers, clearly it was based on something other than the truth. It came from the dark passions, anger, envy, jealousy, and a desire to injure or punish someone who possesses something or someone that you don't have, or can't get.
Miller is making a social commentary on the nature of humanity.