As far as I can see they are the same person, if you can look through all the incorrect names and duplicate wives, and the several merges that have not been tidied, the only difference is the date of birth, but he has rejected the merge twice.
From my research I have
James Hamilton, 1st Lord Hamilton was born circa 1415. He was the son of Sir James Hamilton, 5th of Cadzow and Janet Livingston. He married, firstly, Lady Eupheme Graham, daughter of Patrick Graham, Earl of Strathearn and Eupheme Stewart, Countess of Caithness, after 25 February 1440/41. He married, secondly, Mary Stewart, Princess of Scotland, daughter of James II Stewart, King of Scotland and Marie van Egmont-Gelre, between February 1474 and April 1474. Dispensation from the Pope was granted 25 April 1476, thereby legitimising the two children already born. He died on 6 November 1479.
Should I tidy the long profile and create a sourced narrative with correct dates and propose the merge again?