Reprinted from Newsletter of Rabbi Bitterman of Ateres Mordechai
If you intended to continue eating or drinking, but by mis- take or out of habit you said the Beracha Acharona, there is a doubt whether or not you need to say another beracha before eating. Therefore, to eliminate the doubt, you should listen to another person say the beracha and say Amen, before eat- ing. Alternatively, you can go out of the house and back in- side, which invalidates the previous beracha even if it is still in force. If all of these are impossible and you want to eat or drink immediately, you can think the words of the beracha in your mind, without saying them aloud, and then resume eat- ing. (Beur Halacha 190:2 “Yevarech Beracha”, Kaf HaChayim 190:8)