Introduction. There are 43 kinds of sin that one must bring a sin offering for. [i.e. a female goat or sheep.] A sin offering can only be brought for accidental sin. So here we have a case where there was a piece of forbidden fat cooking the stove. John walks in and eats it. The Peter walks in a minute later and asks where is the piece of forbidden fat I left on the stove? John has to bring a sin offering.
[For the general public let me mention of the 43 a lot concern sexual relationships between family members and the Temple. Besides that there are few others likely idolatry, and Shabat.]

If one eats a piece of forbidden fat חלב, he brings a sin offering [a female goat or sheep]. If he ate a piece and then knew that it was forbidden, and then ate another piece and then knew that was forbidden, he has to bring a one sin offering on each piece. From Tractate Shabat 71 Rambam 6:9. Laws of Accidental Sins.

If he ate two pieces  in one span of forgetfulness and then knew about the first piece. Then in the same span of forgetting he ate a third piece, when he brings a sin offering for the first piece, he is absolved for the sin for the second piece. Rambam שגגות 6:11.

The Beit Joseph brings in the name of the Ri bei Rav an answer that is flimsy. And the Kiryat Sefer says another answer which is worse. Both answer are contradicted directly in the Rambam himself chapter 8:8
Rav Shach offers a third answer that makes lot of sense to me even though there still seems to be some question that remains about it.

What Elazar Menachem Shach suggests is based on two premises. 1. knowledge causes a sin offering. 2. one span of forgetfulness is one sin. Thus he ate the first two pieces in one state of forgetfulness. And he knew about the first piece. So he brings a sin offering for the first piece. but since the second piece was eaten in the same span of forgetfulness the sin offering takes care of both pieces. The beauty of this answer is powerful. And it is common to see this in Rav Shach. And he and Reb Chaim from Brisk himself have no problem in dismissing even the greatest of achronim. And the Ri Bei Rav was the one that renewed the semicha. Still we don't say his words are Halacha LeMoshe MiSinai. We don't even say he was right. The reason is clear. There is such a thing as סוף הוראה (the end of the time it is possible to make a Halachic decision.). As the Gemara says and the Rambam brings in his introduction to Mishne Torah רבינא ורב אשי הם סוף הוראה. The idea here is really two ideas. One is there is no true ordination today. [All legitimate yeshivas teach this openly and it is straight from the Gemara and the Rambam. ] The second idea is that even with true ordination as the Ri Bei Rav had still that can't go against סוף הוראה.
In any case, the problem here is this: We understand now the halacha in the Rambam, and also the end of that halacha that if he brings a sin offering for the third piece that takes care of the second piece also. That is fine. But what about if he only remembered that the second piece was forbidden? It certainly makes sense according to Rav Shach to say that everything would be forgiven and in fact that is exactly what the Rambam says. But then what about the fact that he remembered the first piece and the third piece was not eaten in the same span of forgetting! should not then the first and third pieces be considered separately?