What is the name of your state?GA

My dilemma is this( got divorced in NH). The judge decided every detail, we agreed on nothing. The judge ruled that he could claim all 3 of the children unless I made $20,000 or more and then I could claim 1. I have remarried and I have always been a Stay at home Mom. I consulted a new attorney here and was told that the ruling was unlawful because the judge had no right to rule such a claim. The IRS states that I can can claim the children because they live with me all year. I have been told that I am in a catch 22, I can claim the kids lawfully but because there is a court order that I would be also in contempt of court. Most of the good attorneys here are so booked that they will not accept any cases that will actually go to court. I need advice of what action to pursue and whom to contact. TIA