It depends on how much money you have, doesn't it?
If your parents lose the house because they don't have enough money, you can hold on to the house in any of several ways - buying it outright, paying off their mortgage prior them losing it, making their mortgage payments for them before they lose it, etc.
But holding on to the house only makes sense if you have enough money to pay your own expenses after you have it. Presumably your question applies to a case where your parents' money was barely enough to cover their own expenses, so you wouldn't be getting much besides the house itself.
Personally, if I had enough money to hold on to a $1.5M house, my main objective would be to ensure my parents enjoyed their remaining years to the fullest. Fwiw, I am near a much more minimal FI (stash maybe 450K) and my sister is on track for a rather prosperous FI by Mustache standards but far too little for a $1.5M house. Neither of us will likely ever afford anything near that, but we are in process of giving our mom, who is at modest FI herself, tens of thousands of dollars we inherited from our divorced dad via the sale of his house, simply to increase her pleasure spending during the active phase of her old age.
Whether you can achieve the house goal, the help your parents goal, or both depends primarily on how much money you can contribute and how clear and loving a conversation you can continue having with Mom and Dad. The best financial format will emerge from this conversation. Obviously the discussion to date has already been significant; congrats on that, and best of luck to you.