The rule of the simple interest is
[tex]I=\text{PRT}[/tex]
P is the amount of investment
R is the interest rate in decimal
T is the time
Let her invested x dollars in the 1st account and y dollars in the second amount
Since her total investment is 30,000 dollars, then
[tex]x+y=30000\rightarrow(1)[/tex]
Since the 1st account gives 5%, then
R = 5/100 = 0.05
Since the time is 1 year, then
T = 1
The interest of 1st account is
[tex]\begin{gathered} I_1=x(0.05)(1) \\ I_1=0.05x \end{gathered}[/tex]
Since the 2nd account gives 7%, then
R = 7/100 = 0.07
The interest of 2nd account is
[tex]\begin{gathered} I_2=y(0.07)(1) \\ I_2=0.07y \end{gathered}[/tex]
Since she took a total interest of 1780 dollars, then
[tex]\begin{gathered} I_1+I_2=1780 \\ 0.05x+0.07y=1780\rightarrow(2) \end{gathered}[/tex]
Now, we have a system of equations to solve it to find x and y
Multiply equation (1) by -0.07 to eliminate y
[tex]\begin{gathered} x(-0.07)+y(-0.07)=30000(-0.07) \\ -0.07x-0.07y=-2100\rightarrow(3) \end{gathered}[/tex]
Add (2) and (3)
[tex]\begin{gathered} (0.05x-0.07x)+(0.07y-0.07y)=(1780-2100) \\ -0.02x+0=-320 \\ -0.02x=-320 \end{gathered}[/tex]
Divide both sides by -0.02 to find x
[tex]\begin{gathered} \frac{-0.02x}{-0.02}=\frac{-320}{-0.02} \\ x=16000 \end{gathered}[/tex]
Substitute x in (1) by 16 000 to find y
[tex]16000+y=30000[/tex]
Subtract 16000 from both sides
[tex]\begin{gathered} 16000-16000+y=30000-16000 \\ y=14000 \end{gathered}[/tex]
Then she invested 16 000 dollars in the 1st account and 14 000 dollars in the 2nd account