A bank loaned out $28,500, part of it at the rate of 8% annual interest, and the rest at 2% annual interest. The total interest earned for both loans was $1,770.00. How much was loaned at each rate?

loan at 8% ---- x

loan at other rate ----- 28500-x

.08x + .02(28500-x) = 1770

solve for x