Yes, he stops his prayer and kills the snake or scorpion – according to the statement of the Prophet sal Allaahu alaiyhi wa sallam:
Kill the two black things during the prayer – the snake and the scorpion.
(Reported by the Companions of the Sunan and declared authentic by ibn Hibbaan)
And if he is able to kill both of them during his prayer knowing (that he can do this) without a great deal of effort, then there is no harm in this and his prayer is saheehah (correct).
And with Allaah is the tawfeeq. And may peace and blessings be upon our Prophet Muhammad and his family and his Companions.