In order to find the value of the investment, we can use the following equation:
[tex]P=P_0(1+\frac{r}{n})^{nt}[/tex]Where P is the final value, P0 is the initial value, r is the annual rate, t is the amount of time and n is a factor that depends on the compound interval (for a semiannual compound, we have n = 2).
So for the first period of 4 years, we have that:
[tex]\begin{gathered} P=4000(1+\frac{0.08}{2})^{2\cdot4} \\ P=4000(1+0.04)^8 \\ P=4000(1.04)^8 \\ P=4000\cdot1.368569=5474.28 \end{gathered}[/tex]Then, we had an addition of 5000, so the new initial value is:
[tex]5474.28+5000=10474.28[/tex]Now, for the next 2 years, we have that:
[tex]\begin{gathered} P=10474.28(1+\frac{0.08}{2})^{2\cdot2} \\ P=10474.28(1.04)^4 \\ P=10474.28\cdot1.169859=12253.43 \end{gathered}[/tex]So the final value at the end of 6 years is $12,253.43