So I’m going through the section on taxes and I came across a question that has me confused and was wondering if someone may be able to help.
The question is as follows:
John Kaplan and Anna Forest both have €100,000 each split evenly between a tax deferred account and a taxable account. Kaplan chooses to put stock with an expected return of 7 percent in the taxdeferred account and bonds yield ing 4 percent in the taxable account. Forest chooses the reverse, putting stock in the taxable account and bonds in the tax deferred account. When held in taxable account, equity returns will be taxed entirely as deferred capital gains at a 20 percent rate, while interest income is taxed annually at 40 percent. The tax rate applicable to withdrawals from the tax deferred account will be 40 percent. Cost basis is equal to market value on asset held in taxable account.

What is Kaplan’s aftertax accumulation after 20 years? A €196,438. B €220,521. C €230,521.

In the previous question, what is Forest’s aftertax accumulation after 20 years? A €196,438. B €220,521. C €230,521.
In question 14 I am having difficulty understanding the answer’s formula used for tax deffered account (stocks)
FVTDA =€50,000(1+r)^{n}(1−T_{n})
Why is there no cost basis added back? I thought for tax deferred capital gains we need to add back the cost basis?
In question 15 the answer for the taxable account (stocks) does include the cost basis > why does this one include adding back the cost basis but above it does not?
FV =€50,000⎡(1+r)^{n}(1−t ) + t ⎤