Let's apply all 3 conditions separately and put all possible numbers together.
First condition says that if multiple of 5, then the number is between 1 and 19. Hence, the possible numbers are (5, 10, 15, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39)
Second condition says that if not a multiple of 8, then the number is between 20 and 29. Hence, the possible numbers are (8, 16, 20, 21, 22, 23, 25, 26, 27, 28, 29, 32)
Third condition says that if not a multiple of 10, then the number is between 30 and 39. Hence, the possible numbers are (10, 20, 31, 32, 33, 34, 35, 36, 37, 38, 39)
Only number 32 is there in all 3 result sets. That means that only number 32 satisfies all three conditions. Hence, Ram has 32 eggs in his bucket.