He sold 3/5 of the cookies. That leaves 2/5. He sold a quarter of these: (1/4)(2/5)=1/10. If we call the number of cookies C, then 3C/5 is the number sold in the morning, and C/10 were sold in the afternoon. 3C/5-C/10=150 cookies. So C(3/5-1/10)=150, and C(6/10-1/10)=150, C/2=150 so C=300 cookies.
Check: 3/5 of 300=180, leaving 120, and 120/4=30 were sold in the afternoon. This is 150 less than what was sold in the morning.
The number of cookies sold was 180+30=210 (out of 300).