Book of Actions while Praying starts today..
Hadith no. 988 is a repeat. Read it here.
We used to greet the Prophet while he was praying and he used to answer our greetings. When we returned from An-Najashi (the ruler of Ethiopia), we greeted him, but he did not answer us (during the prayer) and (after finishing the prayer) he said, “In the prayer one is occupied (with a more serious matter).”
Meaning, initially it wasn’t forbidden to speak during prayer. People used to greet each other, and return the greetings as well. But later on, Allah (SWT) forbade it. Because prayer is between Allah and His slave. Nothing should come in between.
the same as No. 290. from the Prophet.
Narrated Zaid bin Arqam:
In the life-time of the Prophet we used to speak while praying, and one of us would tell his needs to his companions, till the verse, ‘Guard strictly your prayers (2.238) was revealed. After that we were ordered to remain silent while praying.
Deliberately speaking invalidates the prayer. See no. 14 here.