The simplest answer is usually the right one.
The answer is... *you cannot*. The only way to take over someone's loan is to get a new mortgage yourself and buy the other person out in a real estate transaction. It's not that it breaks any laws to do what you suggest, it's just that there are ZERO mortgage companies who will transfer a loan. They would rather just foreclose on the home.