Call the amount invested in stocks, x, and the amount invested in bonds, 9000-x
So we have
.05x + (9000-x).08 = 525 simplify
.05x + 720 - .08x = 525
.03x + 720 = 525 subtract 720 from both sides
-.03x = -195 divide both sides by .03
x = $6500 = amt in stocks
9000 - x = 9000 - 6500 = $2500 = amt in bonds