(5)Where a part of the rights is sold and sub-section (4) does not apply, the amount of the deduction to be allowed under sub-section (1) shall be arrived at by-(a)substracting the proceeds of the sale (so far as they consist of capital sums) from the amount of the cost of acquisition of the rights remaining unallowed; and(b)dividing the remainder by the number of relevant previous years which have not expired at the beginning of the previous year during which the rights are sold.