Johnny has 760 stamps altogether. After giving away 2/5 of his 25-cent stamps and 1/3 of his 50-cent stamps, he has an equal amount of 25-cent and 50-cent stamps left. How many 25-cent stamps and 50-cent stamps did he have at first?

q = 25 cent stamps

h = 50 cent stamps
q + h = 750
3/5 q = 2/3 h so 9 q = 10 h or h = 0.9 q
q + 0.9 q = 750 = 1.9 q
q = 395
h = 355