Interesting. I had read basically the same info. (minus the dates) on a Peden genealogy mailing list. Your post prompted me to do some further research.
It seems as though you're referring to Janet Bethune (Beaton) and James Hamilton, 1st Earl of Arran.
According to the Peerage, they had 3 children - Helen, Janet, and James (2nd Earl of Arran).
The only reference to a Margaret Hamilton that I can find is Margaret Douglas, wife of James Hamilton, 2nd Earl of Arran. According to the Peerage, Margaret (Douglas) Hamilton was born circa 1510 and died after May 24, 1579, so once again the dates do not fit with the claim of a circa 1585 marriage between Pethein and Margaret Hamilton.
There are 8 children listed in the Peerage for James Hamilton, 2nd Earl of Arran, and Margaret Douglas. I thought perhaps they had a daughter named Margaret (who married Pethien) as the range of birth/death dates of their children would be more in keeping with a 1585 marriage, but there is no Margaret among these children. One of the sons was James Hamilton, 3rd Earl of Arran, but I can find no documentation of any children sired by this James, so it does not seem likely that he is the James Hamilton III referred to in your post.
I note a similar mention of a Margaret Hamilton/Alexander Peden marriage here: