All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
Firstly, we implore Allaah to bless your father with recovery and a long life.
You should know that it is permissible to talk to the person performing the prayer if it is for the benefit of the prayer, like in order to draw his attention to certain mistakes that he may have made in his prayer or the like. Nayl Al-Awtaar reads, "It is deduced from the hadeeth that it is permissible to talk to the person who is performing the prayer and inform him of whatever is related to the prayer."
Al-Haafith ibn Hajar wrote, "It is better to signal to the person performing the prayer instead of talking to him..." [Fat-h Al-Baari]
Hence, there is no harm for the person who is not performing prayer to talk to his father while in prayer and help him perform the right number of rakʻahs; he may also inform him that he has performed the correct number of rakʻahs; and there is no need for repeating the prayer, even if he recited tasleem before completing the prayer. His prayer is not invalid by reciting the tasleem in this case; when he remembers or is reminded of the fact that he missed any act of the prayer after reciting tasleem, then he should simply stand up, perform whatever he missed, and then perform sujood as-sahw (prostration of forgetfulness), as long as the interval of time that passed after tasleem is not considerably long.
If he can follow someone else performing the prayer, then that would be better for someone in his condition. For more benefit, please refer to fatwa 6904.
It should be noted that if your father becomes absentminded sometimes, as understood from the question, then the times when he enjoys perfect mental powers and is fully aware of what is happening around him, he is considered competent for religious obligations and is obliged to perform the prayers. However, when he is absentminded and is not fully aware of what is happening around him, then he is incompetent for religious obligations and is thus not obliged to perform prayers during these times, nor is he then obliged to make up for the prayers that he missed because the relevant rulings concerning the insane person apply in this case, and, according to the opinion of the majority of the scholars, an insane person is not obliged to make up for the prayers that he missed at the times when he loses his sanity because he is not obliged to perform the prayers at their due times in the first place, being incompetent for religious obligations to begin with. This ruling applies whether the insanity is a permanent or temporary condition.
The Kuwaiti Encyclopedia of Fiqh reads, "If the insane person has become sane again, then he is not obliged to make up for the religious duties and obligations that he missed. The Hanafis adopted the view of the majority of scholars in this regard in case of permanent insanity that extends after the person attains puberty. However, in case of temporary insanity, they held it as the case of loss of consciousness in their view..."
Allaah knows best.