Attorney's hourly rates vary, but you would only be asking them to write a few letters/make a few calls. You aren't looking for someone to represent you in protracted litigation. So your costs are going to be relatively limited.
How much it ends up being is going to depend somewhat heavily on how the other parties respond (for example, does your lender cooperate in help you out of a bad house, does the buyer want to stir up trouble with you, how hard does the agent push for you to get alternate funding, do you have to try alternatives to get out of the contract, does the matter go to mediation (unlikely, but possible)).
Expect an attorney to ask for a deposit (in CA, most deposits are about $5,000.00, but that doesn't mean they will actually use the whole thing (if this was litigation, I would tell you that this doesn't mean that is the total cost, that would just be the starter - but as noted above, this is a very limited engagement).
You can find local attorneys using the State and local Bar Association directories, or private directories such as www.AVVO.com; www.FindLaw.com; or www.Martindale.com (I personally find www.AVVO.com to be the most user friendly).