The first payment of 2000 would grow to 2000*1.06^40=20,571.44 over 40 years.
The second payment of 2000 would grow to 2000*1.06^39=19,407.01 over 39 years.
So we have a series: 2000(1.06^40+1.06^39+1.06^38+...+1.06^2+1.06)=2000*1.06(1.06^39+...+1).
Call the series in the brackets S, so S=(1+1.06+...+1.06^39) a geometric progression.
1.06S=(1.06+1.06^2+...+1.06^40), so 1.06S-S=1.06^40-1 and S=(1.06^40-1)/0.06=154.76197 approx.
Therefore the total amount after 40 years is 2000*1.06*154.76197=328,095.37.