The correct answer is: B. the balance of cash prior to the sale of assets plus or minus a gain or loss from realisation.

The balance of cash prior to the sale of assets is the amount of cash that the partnership has on hand before it sells any of its assets. The gain or loss from realisation is the difference between the sale price of the assets and their book value. The total capital balances is the sum of the capital balances of all of the partners.

When a partnership dissolves, the assets are sold and the proceeds are used to pay off the liabilities. Any remaining cash is then distributed to the partners according to their capital balances.

If the sale of assets results in a gain, then the balance of cash will be greater than the balance of cash prior to the sale of assets. If the sale of assets results in a loss, then the balance of cash will be less than the balance of cash prior to the sale of assets.

The total capital balances are not relevant to the calculation of the balance of cash prior to final distribution to partners.