"'For three sins of Damascus, even for four, I will not turn back my wrath. Because she threshed Gilead with sledges having iron teeth,'" NIV translation
This verse speaks of the modern country of Syria (Damascus is its capitol) and, although God could have given a long list of their offenses, he uses the numbers three and four. We should remember that, throughout the Bible, the number three is associated with the display of God's will and the number four with trials/temptations. We see here that it is God's will to judge Syria because He used them to deal with Israel but they chose to do so harshly. (They failed this test of their hearts.) The iron sledges that the verse talks about were used to beat the grain to separate it from the chaff (which is a kind of refining). God was wanting to refine (purify) His people but Syria wanted to destroy them and so was cruel. This is also what happened to Assyria in Isaiah 10. As His children, we can find comfort in this passage and the fact that God may use a bad situation to correct us but the purpose is refinement and not destruction. This refining process is also described in the tribulations of Revelation 6.
"'I will send fire upon the house of Hazael that will consume the fortresses of Ben-Hadad. I will break down the gate of Damascus; I will destroy the king who is in the Valley of Aven - and the one who holds the scepter in Beth Eden. The people of Aram will go into exile to Kir.' says the Lord." NIV translation
Because of the way they dealt with the people of Israel, God decrees that He will destroy their king and their capitol. God even says that He is going to use the Assyrians to do this. (Kir was a province of Assyria)
"This is what the Lord says: 'For three sins of Gaza, even for four, I will not turn back my wrath. Because she took captive whole communities and sold them to Edom.'" NIV translation
Now, Amos turns to the judgment on Gaza and God could have given a list of charges but He gives a specific reason for the judgment. Gaza was the land of the Philistines who were constantly battling God's people. God's charge against them is simple in that they conquered Israel and sold entire villages into slavery. We know the people of this area as Palestinians today and even now they continue to battle with Israel (God's people).
"'I will send fire upon the walls of Gaza that will consume her fortresses. I will destroy the king of Ashdod and the one who holds the scepter in Ashkelon. I will turn my hand against Ekron, till the last of the Philistines is dead,' says the Sovereign Lord." NIV translation
Because of their treatment of God's people, the judgment is severe and will fall on all of the people and their rulers. Once again, God says that He is going to send fire and that is a reminder that God is purifying the land with this judgment.