x + y = 1000, (1)
0.05x + 0.06y = 58. (2)
From (1), express y = 1000-x and then substitute it into (2)
0.05x + 0.06*(1000-x) = 58
0.05x + 60 - 0.06x = 58
-0.01x = 58 - 60 = -2 ====> x = %28-2%29%2F%28-0.01%29 = 200%2F1 = 200.
Answer. $200 was invested at 5%. The rest $1000 - $200 = $800 was invested at 6%.
Check. 200*0.05 + 800*0.06 = 58. ! Correct !
Solved. // I used the Substitution method to solve the system of 2 equations in 2 unknowns.