i agree with u that bob knows he must have had duplicates of both r2 & y1 in his hand at the time he discarded both of them. but i dont think he has enough information to know where they are.
lets consider two possibilities of what bob's hand could look like -
- X y1 r2 y1 (`X` is any random card)
- y1 X r2 y1
bob discards y1 and draws the second r2. bob knows that one of his slot2/3/4 is also y1.
- r2 X y1 r2
- r2 y1 X r2
bob discards r2 and draws a random card. bob also knows that one of (updated) his slot2/3/4 is another r2.
- X r2 X y1
- X r2 y1 X
in the first example, bob's slot2 & slot4 are playable. in the second, slot2 & slot3 are. (i could make another case where slot3 & slot4 are playable, if bob started with two r2s & two y1s!) therefore i dont think he can know for sure which card(s) he can safely play.
all of this said, if alice chose to save emily's 5, it means alice is ok with bob discarding slot4 on his turn. therefore the two playables must be in slot2 & slot3,
right? well that is usually true, but its
not necessary 100% of the time!!! what if bob drew the
THIRD y1 during one of his discards, and second y1 is currently on his chop? then yes alice
WOULD be ok if bob discarded that, since the third y1 could even be on his slot1 as far as bob knows!
this concept is formalized as
Elimination - u can read it at ur leisure!

but be wary - there are a lot of nuances and edge-cases (some of which i went over here).