Deductions & credits

It's difficult to know how to proceed because it was not the company that held the mortgage that bought it.  A different mortgage company purchased the existing mortgage from the bank that held it and gave me $5000 to sign the papers. So, they didn't actually forgive my debt, they got me out of it, but I was insolvent at the time.  It is kind of confusing, I hope this makes sense.  Thanks for your help.