Pesachim chapter 8, mishnah 2. The mishnah opens: "Ha'omer le'avdo: tzei ushchot alai es hapesach" - a person who instructs his slave to slaughter the Pesach offering on his behalf, without specifying whether he wants a goat or a lamb.
The slave slaughtered one of the two kinds:
"Shachat gedi - yocheil, shachat taleh - yocheil" - whether he slaughtered a goat or a lamb, the master may eat from it. Even though he normally eats specifically from the other kind, since he did not spell out his request, he has fulfilled his obligation.
The slave slaughtered both kinds:
"Shachat gedi vetaleh - yocheil min harishon" - a person cannot be registered on two Pesach offerings at once, and therefore he eats from the first one slaughtered, while the second is left to be burned and is not valid.
The Gemara sets up this halachah and applies it in an interesting way: this ruling, that he eats from the first and the second is burned, was stated specifically about a king and a queen. The reason may seem counterintuitive, but a king and a queen are not particular about their food and are not fussy, and whatever their staff provide for them is good enough for them. For that reason there is no concern that their mind may have been set on the other kind.
With an ordinary person, however, it is entirely possible that his mind was set on the other kind, and the validity of the offering would then depend on the principle of retroactive clarification: that we say retroactively, from the moment he agrees and says "he slaughtered a lamb, a lamb suits me," it has been clarified that this is what he intended from the outset. But it is possible that at the time of the slaughter he was particular specifically about the other kind, and in a matter of Torah law we do not apply the principle of retroactive clarification.
So it emerges that with a king and a queen, who are not particular and not exacting at all, we are not concerned that at the time of the slaughter their intention was for the other kind of animal. But when we are not dealing with a king and a queen, the person cannot eat from either of the two animals that were slaughtered. Even so, it appears that they would not be required to bring a Pesach Sheni, since they fulfilled their obligation with one of the two.
The slave forgot what his master told him:
The mishnah continues: what is the ruling if the master did specify which of the two kinds the slave should slaughter, and the slave forgot his words and has no way of reaching his master to clarify? He must slaughter both kinds, a lamb and a goat, and stipulate: if my master told me a goat, the goat will be his and the lamb will be my Pesach offering; and if he said a lamb, the lamb will be his and the goat will be mine.
Here a problem of ownership arises: whatever the slave acquires automatically becomes the property of his master. Therefore the only way to carry out this stipulation is for the slave to go to a shepherd who is close to his master and looks after his affairs, and that shepherd gives him two animals, a lamb and a goat, on an explicit condition: the animal designated for the master will be the master's property, while the animal designated for the slave will belong to the slave alone, with no ownership by the master over it. Only in these circumstances can the slave make his stipulation.
The master forgot as well:
And what is the ruling when the slave made his stipulation and slaughtered both animals, and when he returned to his master it turned out that the master had also forgotten and says, "I do not know what I told you"? Had the master remembered and informed him, "I told you a goat, and you, the slave, take the lamb" - or the reverse - it would be valid. But now that his words have been forgotten, both animals must be burned, since the master and the slave cannot clarify which of them belongs to whom, and therefore they cannot eat.
Even so, they are exempt from Pesach Sheni, since they did fulfill the mitzvah, and it was only because of a technical mishap that in the end they were unable to eat, but a valid Pesach offering it was.
The Gemara clarifies that this ruling applies specifically to a scenario in which the master forgot after the sprinkling, after the blood of both offerings had been sprinkled, so that at the time of the slaughter and the sprinkling there was still the possibility of eating. But if already at the time of the sprinkling it was impossible to eat the offering, because they had forgotten which one belonged to whom and it could not be clarified, this is not a valid Pesach offering, and they must bring a Pesach Sheni.
In summary: in this mishnah we learned the law of one who sends his slave to slaughter his Pesach offering without specifying the kind: he slaughtered a goat or a lamb - the master may eat; he slaughtered both - he eats from the first and the second is burned, and this ruling was stated specifically about a king and a queen who are not particular, whereas with an ordinary person we do not apply retroactive clarification in a matter of Torah law. We also learned the remedy of a stipulation for a slave who forgot, the need to receive the animals from the shepherd in order to solve the problem of ownership, and the ruling where the master forgot as well - that both animals are burned, and nevertheless they are exempt from Pesach Sheni, provided that the forgetting occurred after the sprinkling.