Answer:
On the first account, she invests $300, earning 0.02*300 = $6.
On the second acount, she invests 800 - 300 = $500, earning $25.
Explanation:
This is a simple interest problem.
The simple interest formula is given by:

In which E is the amount of interest earned, P is the principal(the initial amount of money), I is the interest rate(yearly, as a decimal) and t is the time.
In this question:
Two acounts, one with 2% interest(I = 0.02) and the other with 5% interest(I = 0.05).
Each account has two earnings, that i will call
and

Two investments adding up to 800. I will call the first investment P and the second is 800 - P.
Time is not given, but for simplicity, i will use 1 year.
First investment:
I at 2%. The earnings are
.

Second Investment:
Earnings
, at 5%. So

The earnings add to 31, so
, then

So






So:
On the first account, she invests $300, earning 0.02*300 = $6.
On the second acount, she invests 800 - 300 = $500, earning $25.