Bill earned a total of $495 in simple interest from two separate accounts. If he invested $1,500 more than three times the amount in an account earning 5% interest than in an account earning 7% interest, how much did he invest in each account?