His statement, “And if she wishes,” means the previously married woman.
His statement, “seven [nights]: he may do so, but he must make up the same for the remaining wives,” means that if she wishes him to complete seven days for her, he may do so; however, he must give the remaining wives the equivalent. This is because, once she requests the additional time, she forfeits her privilege of being given preference. At first, she had been given preference by three days; but when she asks for more and is granted what she asked for, that preference is cancelled, and he must divide seven nights each among the remaining wives. This is because, when the Prophet ﷺ stayed with Umm Salamah, may Allah be pleased with her, for three days and wished to resume dividing his time among his wives, he said to her: “You are not insignificant in the sight of your family. If you wish, I will stay with you for seven nights; but if I stay with you for seven nights, I will stay for seven nights with my wives as well.” (1)
The Prophet ﷺ thus gave her the choice between remaining with three nights, which would be exclusive to her, or having seven nights, in which case he would give seven nights to the remaining wives as well. Usually, a woman will choose the three nights, because if she chooses three, he will return to her after three days; whereas if she chooses seven, he will return to her after twenty-one days—unless she anticipates that her menstrual period will come during that time, in which case she may choose the seven nights.
The wisdom—Allah knows best—behind making it seven days is that all the days of the week will have passed over her. A parallel is found in the ʿaqīqah (newborn sacrifice), which was prescribed for the seventh day, because by the seventh day all the days of the week have passed over the child.