Let x be the amount invested at 4 1/5% interest rate. Then, the amount invested at 4% rate would be $12,500 - x.
The interest earned on the x amount at 4 1/5% interest rate can be calculated as x * 4.2 / 100 * 1.
And the interest earned on the ($12,500 - x) amount at 4% rate can be calculated as ($12,500 - x) * 4 / 100 * 1.
The total interest earned after a year is $518, so we can set up the following two equations:
x * 4.2 / 100 * 1 = x * 0.042 * 1
($12,500 - x) * 4 / 100 * 1 = ($12,500 - x) * 0.04 * 1
Adding the above two equations, we get:
x * 0.042 * 1 + ($12,500 - x) * 0.04 * 1 = $518
Expanding and solving for x, we get:
x = $8470
So, Phyllis invested $8470 at 4 1/5% interest rate and $12,500 - $8470 = $4030 at 4% interest rate.