In Fund A;
[tex]\begin{gathered} \text{Amount Invested= \$8000} \\ \text{Profit}=\text{ 4\%} \\ =\text{ 4\% of \$8000} \\ =\text{ \$320} \end{gathered}[/tex]Also, in Fund B;
[tex]\begin{gathered} \text{Let the amount invested be x;} \\ \text{Profit =1 \%} \\ =1\text{ \% of x} \\ =0.01x \end{gathered}[/tex]Total funds, we have;
[tex]\begin{gathered} \text{Amount invested= \$8000+x} \\ \text{Profit}=\text{ 3 \%} \\ =3\text{ \% of (8000+x)} \\ =240+0.03x \end{gathered}[/tex]Then, we can equate the total funds to the sum of invested in fund A and fund B;
[tex]\begin{gathered} 320+0.01x=0.03x+240 \\ 0.03x-0.01x=320-240 \\ 0.02x=80 \\ x=\frac{80}{0.02} \\ x=\text{ \$4,000} \end{gathered}[/tex]The amount invested in Fund B is $4000.