You're asking two different questions here. One is 1031, one is debt forgiveness.
There's not enough information to answer either question, which are taxation question (not a real estate questions). You would have to reveal the ownership entity (LLC, personally held, etc..) and any additional capital and debt information as it relates to the second (B) purchase so your true basis and thus liability can be determined. You should post this question to a tax blog/cpa blog (and double check all my responses as well - I am not a tax expert).
First, once you've 1031'd, correctly, your done. It was an investment property processed by a QI for the purpose of investment and you followed the guidelines for the transaction at the time of sale/acquisition then you're done. Forget about the $75K in capital gains you avoided, you have bigger problems. Let's get to work.
Answers to the debt forgiveness question depends on a bunch of information you've not mentioned.
1. What type of entity was the asset held in (LLC, personally etc.)
2. Was it a non-recourse loan? (if yes, you're clear. No tax)
3. Are you insolvent? If yes, and the asset was personally owned, then you do not owe taxes on the discharged debt. The IRS form you need is 982. Publication 4681.
4. If you aren't sure if you're insolvent, are you willing to become insolvent (file chapter 11)?
I'm also not sure you're clear on your terms. Your "basis" is your initial investment in the property (equity and points). On property A, why would you 1031 a property on which you had no gain? If you're initial investment was $500K and you had $500K in debt on the asset that then sold it for $1M, you had no gain. $500K initial investment plus $500K in debt = $1M. When you sold for $1M and paid off the $500K you got what you started with $500K, no gain, no benefit for processing a 1031 and, of course, no real tax liability.
If what you mean is you bought the property for $500K and you borrowed $500K against it (lucky you) then you had a $0 basis in the property (unless you paid points on the loan and those would factor into your basis) and at the time of sale for $1M had a $500K +/- gain on sale after paying off the debt (I'm not taking into consideration any depreciation or accelerated depreciation on this property and you've not mentioned any pay down on the note or points so I have to assume it was an interest only with full principal due at closing).
So I'll assume that you chose roll the remaining tax free dollars ($500K) into the $2M property. You mention no debt on this asset but you're concerned about loan forgiveness so clearly there's something, let's say you're a great negotiator and got an interest only note on the full balance due or $1.5M. So the full $1.5M loan is still due.
I'm assuming your real problem is you're only able to get $1M for property B, you have a recourse loan for $1.5M and you don't or can't make the payments. And you are losing $500K in equity (from your 1031).
Debt forgiveness is taxable under certain circumstances. Whatever you still owe on property B is probably a tax liability coming "your" (the ownership entity) way and that liability is charged at the entity rate not the capital gains rate. And to "you" it's a debt, what the bank can get for the property is irrelevant (unless you sell it and pay down the unforgiven debt). Sell it for $1.00 if you want, sell it for $0 by giving it back, the debt is still being forgiven (in this case $1.5M) and that's a different tax.
Your best case scenario is to sell it for the $1M it's now worth and at closing all the proceed of sale will go to the bank to reduce the unpaid note to $500K (you should get them to $0 out the legal fees and appraisal fees ect if you agree to sell the asset and take back a note for the unpaid balance) get your best negotiating skills together! Once it closes, the debt will be paid down and a new note (make sure it's a new unsecured note) over whatever terms work for you. Now, no tax due on the debt forgiveness.
For credit purposes, you've (based on the contract you sign to repay the $500K still owed) have turned a secured loan into an unsecured loan which does less to harm your credit (and, very important, can probably be discharged in a chapter 11 bankruptcy if you are insolvent-hire a good attorney before you sign the bank papers).
So, whatever the entity is that you held it in's tax bracket times the unforgiven and unpaid but un-renegotiated loan balance is your tax liability (although if there's partners then this will divide up accordingly) There will be a little bit of factoring for depreciation and points.
Hope this helped, get an accountant and a lawyer. If you're insolvent, sell the asset, pay down the debt, take a new note and file chapter 11 (for the holding entity).
Feb 3, 2011