I'm Lucy, and I'd be happy to answer your questions today. I'm sorry to hear about your dilemma.
Your ex-boyfriend being incarcerated doesn't change his rights under the contract unless there's a clause in there that says so. Neither does your break-up. As long as he's able to make the payments, he'd have the ability to bring a lawsuit demanding that the house be transferred to the two of you when the loan is paid off. He would also have the ability to file a lawsuit to get a restraining order stopping your mother from selling the house, at least until he misses a payment, and he can file something called a Lis Pendens with the county where the house is located. Honestly, that's more difficult when you're in jail, so it could take some time unless he can afford to hire a lawyer. If she sells the house, he could sue for the difference between what the two of you would've paid on the loan and what it cost him to buy a similar house (which could be more or less in 5 years - there's really no way to know).
He has whatever rights to the house were conferred upon the two of you by the contract. If you both have the right to live there, he still has a right to live there. He's essentially a tenant until the house is paid for. Under Arizona law, a landlord is not required to allow a tenant to sublet their interest in real estate. Ariz. Rev. Stat., Section 33-1454. If she DID allow it, the law says she can't unreasonably withhold consent - but since you're living there, too, it's not really unreasonable to reject living with a total stranger. He could move in anyone he wanted if the house were in his name, but it isn't yet. You're basically doing a rent to own agreement, so the landlord/tenant laws apply.
The starting point here is to read the contract again and look for ANY LANGUAGE that lets you or your mom cancel before the sale is complete. If there isn't any, then you can try to negotiate with him where you buy him out of the contract by paying some part of what he's already paid (if your names were on the house at the time of the sale, he'd have an absolute right to half the equity). Or you can wait until he starts missing payments, at which point your mother will be able to say that he's in breach of the contract and can sell the house.
If you have any questions or concerns about my response, please reply WITHOUT RATING. It's important that you are 100% satisfied with my courtesy and professionalism. Otherwise, please rate my service positively so I am paid for the time I spend answering questions. If you are on a mobile device, you may need to scroll to the right. There is no charge for follow-up questions. Thank you.