Deferred capital gain taxation - cost basis

Hi,

I have a simple question regarding the FVIF formula on capital gains taxation.

FVIF= (1+r)^n*(1-Tcg)+B*Tcg

I understand why the formula adds back the last part, however what I’m confused about is why the formula starts the calculation with the market value of the investment and what does it mean.

So for example - a problem says “$1000 is invested for 20 years at a pretax return of 10%…”.

For me the cost is $1000 and naturally the cost basis is 1. What does it mean the initial cost was different than $1000, isnt`t the initial investment of $1000 is the cost incurred?

Thank you,
Anush