Let x be the amount invested at 5% interest. Then the other amount invested is (2x - 400)

the interest gained at 5% is 0.05x using the simple interest formula.

similarly, the interest gained at 6.5% is 0.065(2x - 400)

the total interest gained is 298. thus:

0.05x + 0.065(2x - 400) = 298

solve for x and you can complete the problem