Final answer:
Ravi invested $3000 in the account that paid 5% interest and $17000 in the account that paid 9% interest.
Step-by-step explanation:
To solve this problem, we can use a system of equations. Let's assume that Ravi invested x dollars in the account that paid 5% interest, so he invested (20000 - x) dollars in the account that paid 9% interest. The interest earned from the 5% account would be 0.05x dollars, while the interest earned from the 9% account would be 0.09(20000 - x) dollars. Since the total interest earned is $1680, we can set up the equation:
0.05x + 0.09(20000 - x) = 1680
Simplifying the equation, we get:
0.05x + 1800 - 0.09x = 1680
Combining like terms, we have:
-0.04x + 1800 = 1680
Subtracting 1800 from both sides, we get:
-0.04x = -120
Dividing by -0.04, we find:
x = 3000
Therefore, Ravi invested $3000 in the account that paid 5% interest, and he invested $(20000 - 3000) = $17000 in the account that paid 9% interest.