Genesis 14:7
7 And they returned, and came to Enmishpat, which is Kadesh, and smote all the country of the Amalekites, and also the Amorites, that dwelt in Hazezontamar.
Genesis 36:12
12 And Timna was concubine to Eliphaz Esau's son; and she bare to Eliphaz Amalek: these were the sons of Adah Esau's wife.
The alleged contradiction is how could King Chedorlaomer (Genesis 14:5) kill the Amalekites when Amalek, the grandson of Esau, wouldn't be born until many years later?
Notice that the verse says "the country of the Amalekites". It does not say that Chedorlaomer killed the Amalekites. It is referring to a geographic location. It does however mention "the Amorites, that dwelt in Hazezontamar", who are earlier listed as the descendants of Canaan (Genesis 10:15-16).
This means that Moses, when compiling and editing Genesis, used the land that the Amalekites were occupying at the time he was compiling Genesis as a reference that would have made sense to contemporaries, living at that time. He is informing the reader that Chedorlaomer, during Abraham's time, invaded the land that was currently held by the Amalekites.