Anas bin Malik reported,

It is from the Sunnah that when a man marries a virgin while already having a previously married wife, he stays with the virgin for seven nights and then divides his time equally. When he marries a previously married woman while already having a virgin wife, he stays with her for three nights and then divides his time equally.Abu Qilaba said, "If I wished, I could say that Anas traced this back to the Prophet ﷺ."

Azami 6414

Sahih

عن أنس قال

من السنة إذا تزوج الرجل البكر على الثيب أقام عندها سبعا وقسم، وإذا تزوج الثيب على البكر أقام عندها ثلاثا ثم قسم. قال أبو قلابة: ولو شئت لقلت إن أنسا رفعه إلى النبي ﷺ.

الأعظمي 6414صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Marriage
Chapter
Rights and duties of the Muslim woman, and good treatment of her
Section
Husband staying seven nights with a virgin over a previously married woman, and three nights with a previously married woman over a virgin, then beginning the division
Numbering
Jami al-Kamil 6414 (2nd edition)
Azami 6414