Helen Margaret Dewar MCGREGOR was the daughter of Duncan MCGREGOR and Margaret HENDERSON.Don't know why John is on the marriage record, but the following is the information regarding her birth:
BIRTH:IGI & OPR birth/christening extraction from FHL film # 1040106 - Helen Margaret Dewar McGregor, daughter ofDuncan McGregor and Margaret Henderson, b. 13 Jul 1842 in Dunfermline, Fife Co.Batch# C119506 - FR4294.
They did get his name right on her Death Registration:
!DEATH:Statutory Register for 1871, Deaths is the District of St. George, in the City of Edinburgh, Page 246, # 736 - Helen Blair, Married to John Blair Railway Guard; Died 1871 July Seventeenth1h 15m P.M. at 24 West ?Lauriston? Place, Edinburgh; Female, Aged 29 years; Father Duncan McGregor Feuar (Deceased) and Mother Margaret McGregor M.S. Henderson; Cause of Death Disease of the heart and Dropsy nine months as cert. by ?W. Menzies? M.D.; Informant John Blair, Widower, Present; Registered 1871 July 18th at Edinburgh, Robert ?Dick____?, Assist. Registrar.ScotlandsPeople.org
It appears that you may have used Ancestry.com's 1871 Scotland Census index which implies Thomas BLAIR b. abt 1861 in St. Andrews was Helen's child.He actually was the son of William BLAIR and Lindsay KING, William being David's oldest son:
BIRTH:IGI birth extraction from Civil Registration/Statutory Register 1855-1875 - Thomas BLAIR b. 07 Aug 1860 St. Andrews and St. Leonards, Fife, Scotland, son of William BLAIR and Lindsay KING.Batch # C114531.
!CENSUS:1861 British, Scotland, Fife Co., St Andrews Civil Parish, St Andrews & St Leonards Reg. Dist., E.D. 2, page 5, # 34, South Street 160-
William Blair, Head, 28, Boot Maker, b. Daisie(sic), Fifeshire
Lindsey G. Blair, Wife, 30, b. St Andrews, Fifeshire
David Blair, Son, 5, Scholar, b. St Andrews, Fifeshire
Emily H. Blair, Daur., 2, b. St Andrews, Fifeshire
Thomas Blair, Son, 8 Mo., b. St Andrews, Fifeshire
Source Ancestry.com 1861 Scotland Census Index.(In the index as Blais)
Lindsay died 1 Oct 1865.