Genesis 26:34 states that Esau’s wives were: 1) Judith daughter of the Hittite Beeri, and 2) Basemath, daughter of the Hittite Elon.
Genesis 36:2-3 lists: 1) Adah, daughter of the Hittite Elon, 2) Aholibamah, daughter of the Hivite Zibeon, and 3) Basemath, but here daughter of Ishmael.
Both of these passages are normally attributed to P. So perhaps there was some variation within the Priestly tradition itself. We can also visibly see that details in one tradition get presented in a different manner in the other tradition. Namely, there seems to have been some confusion over Basemath, and whose daughter she was!
On the other hand, the former passage, Genesis 26:34, is part and parcel to P’s continuous narrative (Gen 26:34-35 + 27:46-28:9) where Esau is used as a negative example of what happens when one practices exogamy—namely, they lose their inheritance and are “cut off” from the covenantal community (see #48).
The latter text, Genesis 36:2-3 comes within a larger section of Esau’s/Edom‘s full genealogy. It is quite possible that the Priestly author who penned the narratives now contained in Genesis and the Priestly author who penned these non-narrative genealogical sections were different authors, writing at different times.
At any rate, the two lists are contradictory, even if the whos, hows, and whys elude us.