Limiting the amount you can drop somewhere would be straightforward (just a case of custom get/drop with a counter) but what you're talking about would be an interesting challenge, especially if you wanted the behaviour where objects are returned to you in the order they're dropped. [I'm not sure what the game world logic would be for this behaviour... perhaps knowing that might suggest an easier solution]
I guess if you gave each object a number you could store the appropriate number of the two items dropped in two integers, say drop1 and drop2. Then when the third object is dropped, you return the object numbered drop1 to the player, copy the value of drop2 over to drop1, and place the number of the new object into drop2.
How much code you'd need would depend on how many objects you had... it wouldn't be too bad for these short mini games.
It would be easier to do in an old 8-bit system like the PAWs or Quill, because all the objects are referred to by numbers there anyway, so you don't need code to assign a value to each one.