Let x = the amount invested a 5% and 17,000 - x = the amount invested at 6.5%. Now you can write the equation:
0.05x + [0.065 (17,000 - x)] = 970
Solve for x to get the amount invested at 5% and 17,000 - x will = the amount invested at 6.5%
x = 9,000
17,000 - 9,000 = 8,000