A person invested $6,000, some at 7% and the rest at 5%. The income from the 7% investment is equal to the income from the 5% investment. Find the number of dollars invested at each rate.