The Rebbe explains that although Eldad and Medad were born after Amram separated from Yocheved due to future Torah prohibitions, this separation happened earlier—because Amram, a prophet, foresaw the laws. This resolves the timeline issue. The Rebbe encourages study of Chassidus, the soul of Torah.
https://www.torahrecordings.com/rebbe/igroskodesh/015/010/5537