Hi Emily,
Let x = amount invested at 12%
let y = amount invested at 6%
then
x + y = 5900
.12x + .06y = 540
now multiply the the first equatin by .06
.06x + .06y = 354
.12x + .06y = 540
now subtract
-.06x = -186
x = 3100 (amount invested at 12%
y = 5900 - 3100
y = 2800 (amount invested at 6%
Hope this helps