But if the imam’s forgetfulness occurred in an earlier part of his prayer, before the follower joined him, then the follower is not required to prostrate.
An example of the first case is where the imam’s mistake was an addition: he bowed twice in the second rak‘ah, and you joined him at that point. In this case, you must perform the prostration after completing your prayer, because you caught the imam while he was making that mistake, so your prayer became connected to his, and the deficiency that occurred in his prayer also affected yours.
An example of the second case is where the extra bowing occurred in the first rak‘ah, and you did not join him until the second rak‘ah. In that case, you are not required to prostrate, because the original basis for the obligation of prostration here was following the imam, and following him in this case is impossible, since it is after the salam. Moreover, you did not catch the imam in the rak‘ah in which he made the mistake. Thus, you joined him in a portion of the prayer in which no forgetfulness occurred after you had joined him, so you are not required to prostrate.
This is the correct view in this issue. The author’s words, however, indicate that you should follow him in the prostration after the salam, whether or not you caught the part in which he forgot.
Issue: If a follower who is making up missed rak‘ahs makes a mistake in his prayer, while the imam has not made a mistake, must he perform the prostration?
That is, if a follower joins the imam in the second rak‘ah, forgets to say, “Glory be to my Lord, the Magnificent,” while bowing, and the imam says the salam, after which the follower rises to complete what he missed—must he perform the prostration of forgetfulness?
The answer is that he must perform the prostration of forgetfulness if his omission is one that requires prostration, because he has then separated from his imam, and there is no longer any مخالفة (contradiction of the imam) in his prostrating at that point.