(ii)the portion of the value computed in clause (i) as is equal to the amount of its capital shall be allocated among its partners or members in the proportion in which capital has been contributed by them and the residue of the value shall be allocated among the partners or members in accordance with the agreement of partnership firm or association of persons for distribution of assets in the event of dissolution of the firm or association, or, in the absence of any such agreement, in the proportion in which the partners or members are entitled to share profits and the sum total of the amount so allocated to a partner or member shall be treated as the fair market value of the interest of that partner or member in the firm or the association of persons, as the case may be.