All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
It is desirable for the person intending to eat or drink to say: Bismillah (in the Name of Allah) before beginning to eat or drink. Now, if he forgets to do so, he can say it anytime he remembers it as long as the meal or drink has not finished.
‘Aa’ishah narrated that the Prophet said: “When any of you eats a meal he should say “Bismillah” (before starting). If one forgets to say so at the beginning, then he should say: “Bismillahi Awaluhu wa Aakhiruhu” (i.e., in the Name of Allah at its beginning and its end).” [At-Tirmithi]
Tuhfatul-Ahwathi reads: “If the person leaves saying Bismillah at the beginning of eating whether voluntarily or because of forgetfulness, or ignorance, or inability to do so for any reason, and if he is able to say it while eating, then it becomes desirable for him to do so, saying: “Bismillahi Awaluhu wa Aakhiruhu” (i.e., in the Name of Allah at its beginning and its end).”
From the above, we deduce that there are three probabilities: the person can remember to say Bismillah before eating, while eating or after eating.
So, if the person says Bismillah at the beginning that is good. If he remembers it while eating, he says it and adds: "at its beginning and its end". But if he remembers it only after finishing eating, then he does not have to do anything.
Allah knows best.