Hi Steven,
This is a tricky one, as it really goes by a case-by-case basis. If you do it yourself, without an attorney, the cost is approximately $400 per person for fees and such. Add another $1,000 or so per person if you doing with an attorney. But keep in mind that it depends on your case and your attorney. You can contact http://www.plawcr.com, a firm that exhibits and speaks at IL events for more information. Or check out the list of attorneys from the U.S. Embassy: http://costarica.usembassy.gov/attorney.html
As far as how long, that also depends on your specific case, type of residency, and whether you your application is complete when you first turn in your paperwork. But I think minimum is four months, with some people taking more than a year.