Like do people in suryavansha marry each other, if they are very distant relatives? I once read somewhere that one can marry with someone, whose relations goes as far as 8th or more generation of having same ancestors. The author gave source as vedas. I dont know if its true or not. What does shastras say about it?
Yes you can.
Arjuna married Subhadra.
Stopped by them, Arjuna returned to Dwaraka and was united in marriage with Subhadra. Worshipped by the sons of Vrishni's race, Arjuna, sporting there as he pleased, passed a whole year in Dwaraka. The last year of his exile the exalted one passed at the sacred region of Pushkara. After the twelve years were complete he came back to Khandavaprastha.
Both the Yadavas and the Kurus are chandravanshi