Get your taxes done using TurboTax

your mortgages - primary or HELOC, can't increase your basis and reduce your capital gain.

That's a pipe-dream.