For this reason, they want to transfer the house to me and I pay a small compensation.
I'll put it this way: They sell you the house. You pay a (fair) price. From the purchase price, the two pay off the loan (including prepayment penalty, ask the bank; there remains profit or residual debt). You possibly register a new mortgage if you cannot pay the house in cash. Do you want to have the house? What will you do with it then? Will the divorced people then pay rent to you? Move out, you move in? Another option: You lend them money. As security, a mortgage is registered. It ranks behind the bank; if the bank's claim is significantly less than the market value, that could be okay. Otherwise, you won't gain much from it. Third option: You buy a part of the house, the land register is changed to three owners. Whether and how that works, I don't know; questionable for me would be determining a fair value if the mortgage remains (house not free of encumbrances --> value reducing IMHO). Either way, it will be an adventure. The cleanest is solution 1, the purchase, couple moves out and gone. But does that fit the interpersonal constellation?