A buyout works any way the two parties agree on. But what's important is that the buyout agreement must be written prior to the purchase. Don't try to negotiate it when one decides to move out.
Back in the 1980s, equity sharing was popular, and there were many "flavors" of buyout agreements. Today, there's a variation of land trusts that approach the same subject. And lease-options can be structured the same way.
Going into it, there should be a specification about who is putting up the money for the downpayment and who will be responsible for monthly payments. It can be split down the middle, or structured so that one puts up the cash for the downpayment and the other pays most of the mortgage. There are many possibilities. Along with this, the ownership percentages should be determined. Maybe each owns 50%. But if one put up more of the downpayment, or if one is paying more of the mortgage, the ownership percentages might be unequal--for instance, 60%/40%, or 70%/30%.
To oversimplify somewhat, usually there's a specified mechanism for determining the property's fair market value. It might be a Realtor's CMA...or CMAs from two Realtors, one selected by each party. Or it could be a formal appraisal. (Actually, in some cases it doesn't even have to be fair market value. It can just be a number agreed to in advance. But it generally seems more fair to both parties if you go with a fair market value.)
So, the first step is defining how the value of the property will be established. You've already defined the ownership percentages. So the second step is defining the buyout process. Is the buyer required to refinance? To pay cash? Or will the seller "finance" the buyer. If so, over what period of time? At what interest rate?
And if one party wants to sell, but the other doesn't want to buy, what happens then? Can the seller sell his portion to someone else?
A lawyer familiar with equity sharing arrangements should be able to help. Or, if you go the landtrust route, a lawyer familiar with land trusts can structure the deal so it works for everyone.
Hope that helps.