Let $x be the amount of money Helene invested in first account. Then $(1000-x) is the amount of money she invested in second account.
1. First account paid 5% annual interest. 5% from $x is $0.05x.
2. Second accoubt paid 6% annual interest. 6% from $(1000-x) is $0.06(1000-x).
3. The total amount of interest she earned after 1 year was $58. This means that
0.05x+0.06(1000-x)=58.
Solve this equation:
0.05x+0.06·1000-0.06x=58,
0.05x+60-0.06x=58,
-0.01x=58-60,
-0.01x=-2,
0.01x=2,
x=200.
1000-x=1000-200=800.
Answer: Helene invested $200 in 1st account and $800 in 2nd account.