Arranging the cups 1,2,3,4,5,6 and 7 according to given information :
1. Cup 3 is placed third to the left of cup 7.
2. Neither cup 3 nor cup 7 are placed at the extreme ends of the shelf.
(Two cases are arising here)
3. Cup 4 is not placed immediate next to either cup 3 or cup 7.
4. Only one cup is placed between cup 3 and cup 5.
5. Two cups are placed between cup 5 and cup 1.
6. Cup 2 is placed immediately next to cup 4 (Only case 2 is satisfying the condition).
So, case 1 is discarded.
The final arrangement is :
Cups 3, 6 and 5 are between cups 1 and 7.
Hence, the correct answer is "3".