I need to find how much money he invested for 5% of the account and 7%.

He invested $32000 in the 5% account and $8000 in the 7% account
Explanations:Total amount invested in both accounts = $40000
Let the amount invested in the 5% account be x
The amount invested in the 7% account = 40000 - x
Total interest = $2160
Let the interest on the 5% account be y
The interest on the 7% account = 2160 - y
time, T = 1 year
[tex]\text{Interest = }\frac{P\times R\times T}{100}[/tex]where P is the prinicipal, R is the rate, and T is the time
For the 5% account:
[tex]\begin{gathered} y\text{ = }\frac{x\times5\times1}{100} \\ y\text{ = }\frac{5x}{100} \\ y\text{ = }0.05x\ldots\ldots\ldots(1) \end{gathered}[/tex]For the 7% account:
[tex]\begin{gathered} 2160-y=\frac{(40000-x)\times7\times1}{100} \\ 2160-y\text{ = }\frac{280000-7x}{100} \\ 2160-y\text{ = 2800 - 0.07x} \\ y\text{ = 007x-2800+2160} \\ y\text{ = 0.07x}-640\ldots\ldots..(2) \end{gathered}[/tex]Equate (1) and (2)
0.05x = 0.07x - 640
0.07x - 0.05x = 640
0.02x = 640
x = 640/0.02
x = 32000
Amount invested in the 5% account = $32000
Amount invested in the 7% account = 40000 - x
Amount invested in the 7% account = $40000 - $32000
Amount invested in the 7% account = $8000