Hello I would appreciate if you could help me with this math question:

The number of Eric’s $5 to $10 was 3:2 at first. He used 1/5 of his $10 and some $5 notes to pay for a gift. The ratio of the number of $5 notes to $10 notes spent on the gift was 3:1. If the amount of $5 notes left was $360, how much did the gift cost?

Thank you:)