If it is a short sale, lenders that hold short pay off mortgages generally require that it be an "arms length transaction", or they won't agree to the short payoff. So the answer is NO...if it is a short sale.
To my knowledge, if is is NOT a short sale, their are no laws against it.
I am thinking that there is more to your question than we are seeing:
It sounds like you are asking if you buy it on a Shortsale because he is in trouble.
The answer to that would be, NO! you cannot.
You can bail him out, but you cannot profit from the situation.