Let
x = amount invested at 5%
y = amount invested at 9%
the amounts are in dollars
We have 6000 total to be split up between the two accounts. This split is likely not to be equal. However, the two values x and y must add up to 6000 because we only have two accounts to choose from.
So the first equation is
x+y = 6000
we can solve for y to get
y = 6000-x
subtract x from both sides
----------------------------------------------
Now onto setting up the second equation
We invest x dollars into the 5% account so we earn 0.05*x dollars in interest for one year from just the 5% account. Similarly, we earn 0.09*y dollars from the 9% account.
In total, we earn 0.05*x + 0.09*y dollars overall. This amount must be set equal to 380 as this is the total amount of interest earned.
So the second equation is
0.05*x + 0.09*y = 380
-----------------------------------------
Now use substitution to solve
0.05*x + 0.09*y = 380
0.05*x + 0.09*( y ) = 380
0.05*x + 0.09*(6000 - x) = 380 .... replace y with 6000-x
Solve this for x and then use the x value to find y