x = the money invested in the first fund
y = the money invested in the second fund
You have $6000 to invest in two stock funds
x + y = 6000
5% annual interest from x + 9% annual interest from y = $380
0.05x + 0.09y = 380
by solving the system of equations
x + y = 6000
0.05x + 0.09y = 380
we find
x = $4,000
y = $2,000
there were $4,000 invested in the first account and $2,000 invested in the second account.