Question: Bedlay Castle was inherited by James Roberton, Lord Bedlay from his father who bought it from whom?

full_context: Document 1: Kelburn Castle: Kelburn Castle is a large house near Fairlie, North Ayrshire, Scotland. It is the seat of the Earl of Glasgow. Originally built in the thirteenth century (the original keep forms the core of the house) it was remodelled in the sixteenth century. In 1700 the first Earl made further extensions to the house in a manner not unlike a French "château" which is virtually how it appears today. In 1977 the house and grounds opened to the public as a country park. It is one of the oldest castles in Scotland and has been continuously inhabited by the same family for longer than any other. The castle is protected as a category A listed building, while the grounds are included in the Inventory of Gardens and Designed Landscapes in Scotland.
Document 2: Robert William Jameson: Robert William Jameson, WS (1805–1868): A Writer to the Signet in Edinburgh, Town Councillor, newspaper editor, poet and playwright, Robert William Jameson was the father of Sir Leander Starr Jameson, South African statesman and prime minister, and the nephew of Professor Robert Jameson of the University of Edinburgh. Born in Edinburgh in 1805, Robert William was the son of Thomas Jameson, a wealthy shipowner, merchant and burgess of the city of Edinburgh, as recorded in Colvin, Vol. 1: 1-2 (1922). Colvin writes of Robert William's father and grandfather, both of whom were named Thomas Jameson, that:
Document 3: Craigmillar Castle: Craigmillar Castle is a ruined medieval castle in Edinburgh, Scotland. It is 3 mi south-east of the city centre, on a low hill to the south of the modern suburb of Craigmillar. The Preston family of Craigmillar, the local feudal barons, began building the castle in the late 14th century and building works continued through the 15th and 16th centuries. In 1660 the castle was sold to Sir John Gilmour, Lord President of the Court of Session, who made further alterations. The Gilmours left Craigmillar in the 18th century, and the castle fell into ruin. It is now in the care of Historic Environment Scotland.
Document 4: Robert Balfour, 6th of Balbirnie: Lieutenant-General Robert Balfour of Balbirnie (3 May 1772 – 31 October 1837) was a son of John Balfour of Balbirnie and Mary Gordon, daughter of James Gordon of Ellon.
Document 5: Thirlestane Castle: Thirlestane Castle is a castle set in extensive parklands near Lauder in the Borders of Scotland. The site is aptly named Castle Hill, as it stands upon raised ground. However, the raised land is within Lauderdale, the valley of the Leader Water. The land has been in the ownership of the Maitland family since 1587, and Thirlestane served as the seat of the Earls of Lauderdale. The castle was substantially extended in the 1670s by the first and only Duke of Lauderdale. Further additions were made in the 19th century. The castle is now cared for by a charitable trust, and is open to the public.
Document 6: Robert Lauder of Quarrelwood: Sir Robert de Lawedre (Lauder), Knt., of Quarrelwood (died about 1370) was Justiciar of Scotia, a Scottish soldier of great prominence and Captain of Urquhart Castle. He is recorded by Fordun, in his "Scotichronicon", and in "Extracta ex variis Cronicis Scocie" as "Robertus de Lavedir 'the good'"
Document 7: Charles Bruce, 5th Earl of Elgin: Charles Bruce, 5th Earl of Elgin and 9th Earl of Kincardine (6 July 1732 – 14 May 1771) was the son of William Bruce, 8th Earl of Kincardine. His mother was Janet Roberton, daughter of James Roberton (principal Lord of Session) and great-granddaughter of advocate and judge Lord Bedlay
Document 8: Sir Thomas Boyd: Sir Thomas Boyd of Kilmarnock was a 14th-century Scottish landowner and lord of Kilmarnock in Ayrshire. He was the son of Sir Robert Boyd, who fought at the Battle of Bannockburn. In 1346, he was taken prisoner at the battle of Neville's Cross. He is known for building the earliest parts of Dean Castle in around 1350, and the castle still stands today and is open to the public. Sir Thomas was succeeded by his son, Thomas (died 1432). Sir Thomas' later descendants were the Earls of Kilmarnock.
Document 9: Ardrossan Castle: Ardrossan Castle is situated on the west coast of Scotland in the town of Ardrossan, Ayrshire. The castle, defended by a moat, stands on a ridge above the town. There is a keep dating from the fifteenth century, and a vaulted range containing a kitchen and cellars. In a deep passageway there is a well. Part of the keep remains up to the corbels of the parapet, but it is in ruins. The original castle, owned by Clan Barclay, was partly destroyed during the Wars of Scottish Independence. This event, in which the English garrison were slaughtered, became known as "Wallace's Larder," a name which is still applied to the remaining vaults. Rebuilt by Clan Montgomery in the 15th century, Ardrossan later fell into disuse and was partially demolished by the soldiers of Oliver Cromwell in the 17th century who used the stones to help construct the Ayr Citadel.
Document 10: Robert Lauder of Beilmouth: Sir Robert Lauder of Beilmouth, Knt., (died 24 June 1709) was an armiger, lawyer and Clerk of Exchequer in Scotland. In 1683 he was made a Justice of the Peace for Haddingtonshire. As Robert Lauder of Belhaven he was in the old Scottish parliament for Haddington in 1685, and, as Sir Robert Lauder of Beilmouth, in 1704. He was also Commissioner of Supply for Haddington in 1689 and 1690.
Document 11: Crookston Castle: Crookston Castle is located in the Pollok area of south-west Glasgow, Scotland. The castle is located some 5 miles (8 km) south-west of the city centre, and 3 miles (5 km) east of Paisley, overlooking the Levern Water, just before its confluence with the White Cart Water.
Document 12: Bedlay Castle: Bedlay Castle is a former defensive castle, dating from the late 16th and 17th centuries. It is located between Chryston and Moodiesburn in North Lanarkshire, Scotland. The castle is just off the A80 road, around 8 miles to the north-east of Glasgow, at [ NS692700] .
Document 13: Edzell Castle: Edzell Castle is a ruined 16th-century castle, with an early-17th-century walled garden. It is located close to Edzell, and is around 5 mi north of Brechin, in Angus, Scotland. Edzell Castle was begun around 1520 by David Lindsay, 9th Earl of Crawford, and expanded by his son, Sir David Lindsay, Lord Edzell, who also laid out the garden in 1604. The castle saw little military action, and was, in its design, construction and use, more of a country house than a defensive structure. It was briefly occupied by English troops during Oliver Cromwell's invasion of Scotland in 1651. In 1715 it was sold by the Lindsay family, and eventually came into the ownership of the Earl of Dalhousie. It was given into state care in the 1930s, and is now a visitor attraction run by Historic Scotland (open all year; entrance charge). The castle consists of the original tower house and building ranges around a courtyard. The adjacent Renaissance walled garden, incorporating intricate relief carvings, is unique in Scotland. It was replanted in the 1930s, and is considered to have links to esoteric traditions, including Rosicrucianism and Freemasonry.
Document 14: James Roberton, Lord Bedlay: James Roberton, Lord Bedlay (c. 1590 – May 1664) was a Scottish advocate and judge. He was born to Archibald Roberton of Stainhall, youngest son of John Roberton 9th Laird of Earnock, and Elizabeth Baillie, daughter of Robert Baillie of Jerviston. He inherited Bedlay Castle from his father, who bought it from James, the 8th Lord Boyd. He became Lord Bedlay upon the occasion of being raised to the judicial bench in 1661.
Document 15: Sir David Cunningham, 1st Baronet, of Robertland: Sir David Cunningham, 1st Baronet of Robertland was the grandson of David Cunninghame of Robertland, Master of Work to the Crown of Scotland for King James VI of Scotland. He was, by King Charles I, created a Baronet of Nova Scotia on 25 November 1630, by Letters Patent to him and his heirs male whatsoever.
ground_truth: James, the 8th Lord Boyd