"Seven days shall it be with its mother': What is the intent of this? Because it is written (Leviticus 22:27) "then it shall stay seven days under its mother" — with its mother (i.e., while its mother is living). But perhaps, "under," literally, (i.e., instead of its mother, [when its mother has died]). It is, therefore, written (here) "Seven days shall it be with its mother." Just as here, with its mother, so, there, with its mother.
Seven Days Shall It Be with Its Mother, the Torah Requires
Mekhilta Tractate Kaspa 1:27