Joseph has $12500 to invest in two different accounts. Account 1 pays 9% interest and account 2 pays 12%. After a year, the interest paid by account 2 is twice the interest paid by account 1. How much money did Joseph invest in each account?