The interpretation of this narration is that the phrase "then prays" refers to him having entered the prayer but not yet completed it. In such a case, he is not required to interrupt the prayer; rather, he should continue with it. However, if he had already completed the prayer and the time for the prayer was still remaining, he would be obligated to repeat it, as mentioned earlier.
Commentary #14