Given:
Amount invested in fund A = $4000 less than investment in fund B.
Interest in fund A = 7% = 0.07
Interest in fund B = 5% = 0.05
Total profit = $1040
Let's find the amount invested in fund B.
For the investment in fund A, we have:
A = B - 4000
The equation below represents this total profit:
0.07A + 0.05B = 1040
Now, we have the system of equations:
A = B - 4000
0.07A + 0.05B = 1040
Where A is the amount invested in fund A while B is the amount invested in fund B.
Let's solve the system simultaneously using substitution method.
Substitute (B - 4000) for A in equation 2.

Apply distributive property:

Combine like terms:

Divide both sides by 0.12:

Therefore, the amount invested in Fund B is $11,000
ANSWER:
$11,000