Hi.
To solve this problem, we have to keep in mind that the interest earned in that first year - $325 - is the amount of interest earned by both accounts together.
Now we write an equation to reflect that understanding. Let's call the first account A and the second account B. We know that the annual interest rate on A is 5 percent and the annual interest rate on B is 7 percent. So:
0.05A + 0.07B = $325
We also know that the principal in both accounts together is $5,000.
So:
A + B = $5,000
So A = 5,000 - B
Now let's substitute that into the equation we wrote:
.05(5,000 - B) + .07B = 325
250 - .05B + .07B = 325
.02B = 75
B = $3,750
If B = $3,750, then A = $5,000 - $3,750 = $1,250
Now we can figure out the interest on each account:
.05A + .07B = $325
.05 ($1,250) + .07 ($3,750) = $325
A = $62.50
B = $262.50
Account A earned $62.50 in interest during the year, while account B earned $262.50 in interest during the year.