Solution:
The $4000 that he invested in Fund A returned a 2% profit
The amount that he invested in Fund B returned a 5% profit
Both funds together returned a 4% profit
Let "x" be the amount invested in fund B
Therefore,
2 % of 4000 + 5 % of x = 4 % of (4000 + x)
Solve,
[tex]\frac{2}{100} \times 4000 + \frac{5}{100} \times x = \frac{4}{100} \times (4000 + x)\\\\80 + 0.05x = 0.04(4000 + x)\\\\80+0.05x = 160 + 0.04x\\\\0.01x = 80\\\\Divide\ both\ sides\ by\ 0.01\\\\x = 8000[/tex]
Thus he invested $ 8000 in fund B