If the hypothetical goal here is to have person A effectively buy person X a house, why ever foreclose or forgive the loan? Why not just have person X be in default to person A indefinitely? In fact, why not have person X pay the interest-only amount to person A (while falling in arrears on the full payment) and write of the payments against taxable income? And person A can probably gift most / all of that money back to person X (assuming spouses for each are playing too).