In general, the compound interest formula is
[tex]A=P(1+\frac{r}{n})^{nt}[/tex]In our case,
[tex]A=40000,r=4\%=0.04,n=2,t=7[/tex]Therefore,
[tex]\Rightarrow40000=P(1+\frac{0.04}{2})^{14}[/tex]Solving for P,
[tex]\begin{gathered} \Rightarrow P=\frac{40000}{(1+\frac{0.04}{2})^{14}}=30315.000983\ldots \\ \Rightarrow P\approx30315 \end{gathered}[/tex]The answer is approximately $30315