Answer
$4000$ dollars at $4.5\%$ and $8000$ dollars at $5\%$.
Work Step by Step
Let $x$ be the amount invested at $4.5\%$ interest. Then the amount invested at $5\%$ interest is $12000-x$. Then our equation is: $0.045x+(12000-x)\cdot0.05=580\\0.045x+600-0.05x=580\\-0.005x=-20\\x=4000.$
Thus I invested $4000$ dollars at $4.5\%$ and $8000$ dollars at $5\%$.