the Town of Mashpee has implemented a ruling that requires ANY system more than 30 years old to be replaced regardless of wether or not it passed a title five inspection.
As for price it can vary greatly depending on design and engineering specs. All systems are designed per a percolation test and soil type at that specific location. An installer would not quote the job without a design plan so they knew what was required and what they would be putting in. You might be able to get a ballpark number from a an experienced individual in the area and familiar with the soil type at that location. However, no one will quote it without a plan. So the first step is to get a perc test and get it engineered. You're looking at 7-10K at a minimum and then the cost of landscaping to put the yard back together.
On that same note buying a SHORT sale with this risk involved becomes even more risky as you are now out monies for testing and design on a property you may never actually own. While a lot of short sales are being approved these days there are still those that ultimately end up in foreclosure.
Whoever you contact for septic system replacement, make sure they know the area. The cost to replace a septic system can vary greatly within any town in Massachusetts, but there are issues specific to the Cape because of the porous, sandy soil, low elevations, marshlands, wetlands, etc. It might cost you $12,000 to replace all the elements in the existing system, while your neighbor has to spend many times that amount to do the same thing. Also, septic systems in many locations on the Cape require a closed system that will require regular pumping, at an additional cost.
As with any major construction work, I'd recommend checking with people you know and trust to give you a referral, checking with the BBB and consumer sites such as Angie's List, and try to get two or three written estimates. You may have to contact 5 or 6 contractors (or more) in order to find two or three who will come out to give you an estimate within a reasonable timeframe.
And don't be too surprised if they want to charge you for an estimate, since they usually need a couple of hours to visit the site, maybe perform some tests, evaluate many variables, and write up the estimate. Most will probably credit you the cost of the estimate on the final bill if they do the job.
Best of luck!