At first, John had some $10 notes and $2 notes in the ratio 3:8. After exchanging two $10 notes for $2 notes, the ratio of $10 notes to $2 notes became 1 : 3. Find the amount of money John had.

At first, John had some $10 notes and $2 notes in the ratio 3:8. After exchanging two $10 notes for $2 notes, the ratio of $10 notes to $2 notes became 1 : 3. Find the amount of money John had.