In the ninth chapter of Maseches Pesachim, in Mishnah 8, the Mishnah deals with the law of a Pesach offering that became mixed up with other offerings: how one is to act with a mixture whose identity is unknown, and how each animal is restored to its proper category.
"HaPesach shenis'arev bizvachim":
A Pesach offering may become mixed up with offerings of other types, and it is unknown which of the animals is the Pesach, which is an olah - which is not eaten at all - and which is an asham. The Mishnah therefore rules: "Kulan yir'u ad sheyista'avu" - all the animals graze until a blemish develops in them, "v'yimachru" - and they are sold, and afterwards "v'yavi bidmei hayafeh shebahen mimin zeh uvidmei hayafeh shebahen mimin zeh" - he brings, with the value of the most valuable among them, an offering of this type, and with the value of the most valuable among them, an offering of that type.
Calculating the value:
The animals may differ from one another in value, and it is unknown whether it is specifically the Pesach that is the most valuable of them, or perhaps the olah or the asham. Once a blemish has been brought about in all of them and they have been sold, and one comes to purchase new offerings with their proceeds - one as a Pesach, one as an olah and one as an asham - one must be stringent and assume regarding each and every offering that it was the most valuable one in the mixture. When dealing with the olah, we assume the olah was the most valuable; when dealing with the Pesach, we assume the Pesach was the most valuable; and so too with the asham. It emerges that for each one of the offerings one must spend the sum of the most valuable of the three.
"V'yafsid hamosar mibeiso":
This additional expense comes at the owner's own cost. For example: if the most valuable of the animals is worth two hundred, and the other two are worth one hundred and fifty each, it turns out that their sale brought in only five hundred. But since two hundred must be spent on each and every offering, six hundred are required. The difference of one hundred - "yafsid hamosar mibeiso" - the owner makes up out of his own pocket.
"Nis'arev bibchoros":
What is the law when the Pesach offering became mixed up with a bechor? A bechor and a Pesach share a common feature: the blood of both is placed with a single sprinkling, in one place on the mizbe'ach. In such a case Rabbi Shimon says: "Im chavuras kohanim - yocheilu" - if the group eating is a group of kohanim, they may be eaten. Even though a bechor is restricted to being eaten by kohanim alone, while a Pesach offering is eaten by anyone, since it is unknown which of the animals is the bechor and which is the Pesach, one may treat them as a Pesach and be stringent that they be eaten specifically by a group of kohanim, as their own Pesach offering.
And this is how it is done: the group of kohanim takes the two animals that became mixed up, and since it does not know which is which, it stipulates that whichever of them is the Pesach shall be the Pesach and the other the bechor, and they eat both of them. Since those eating are kohanim, even if the animal being eaten as the Pesach is in fact the bechor - there is no disqualification in this, for they are kohanim.
And why is this ruling stated according to Rabbi Shimon alone? A bechor is eaten for two days and the one night between them, whereas here the eating of both animals would be limited until midnight, following the law of the Pesach offering, since with each of them there is the possibility that it is the Pesach. It emerges that because of the doubt we shorten the time for eating the bechor. The Sages disagree and say: "Ein mevi'in kodashim l'veis hapesul" - one does not bring sacred offerings into a state of disqualification; one may not cause offerings to become disqualified before their time, and therefore one should not act this way. Rabbi Shimon holds that it is permitted to do so, and therefore he is the one who permits, in this case, that a group of kohanim eat both animals.
In summary: In this Mishnah we learned two laws of mixtures involving the Pesach offering. A Pesach that became mixed up with other offerings - they all graze until a blemish develops, they are sold, and with their proceeds the owner brings an offering of this type and of that type at the value of the most valuable among them, making up the difference out of his own pocket. A Pesach that became mixed up with a bechor - which are alike in having a single sprinkling - is the subject of a dispute between Rabbi Shimon and the Sages: according to Rabbi Shimon a group of kohanim eats both of them until midnight, and according to the Sages one may not do so, because one does not bring sacred offerings into a state of disqualification.