Why would you put your credit at risk with someone who has already wrecked theirs? Forget about legal or not, it's not smart. If they fail to keep up with the bargain your credit is toast. If they don't pay their taxes, you are responsible. If someone is injured on the property you may get sued.
What part of this is good for you? It's great to be nice, but chances are this would blow up in your face and leave you stuck evicting them and trying to clean up a mess.
I just closed a short sale for someone who used their credit with some "investors" on a flip project. They were totally burned and their once perfect credit will be messed up for years. Please, legal or not, don't do this.
Your scenario can be labeled from your perspective as the 'worst worst' option. You will do what ever you want but the consequences of pursuing this are quite easily known. There will be no place for you to hide.
I would have them list the property at the market price and you make the offer to the bank through the listing realtor , if your offer is below the mortgage amount the bank may not accept it anyway . If it is a shortsale the fact that the current owner " offered " you the home does not make it a crime.
You would have to disclose on the HUD the seller paid closing cost , the DP cannot come from the current owner , the monthly payments are just rent payments
If this person is a relative, then it is definitely ILLEGAL.
There are sooooo many things that can go wrong with this:
And if they have all this money, why don't they just negotiate to save the house.
There are Red Flags all over the place.
Good luck and may God bless