The clue is on the 1881 - Kennedy (son in law - i.e. step son)
She's registered as Williamina Kennedy (illegitimate) . Mother Jane Rogerson (widow of William Kennedy ?drainer who died 24 October 1874)
Born 24 April 1879 Threewellbrae, Hoddom
Gadget
Gadget got there 4 mins before me !!
On her 1906 marriage register entry Williamina's mother is shown as Jane ROGERSON or KENNEDY, which is why she is registered in 1879 under those surnames instead of TELFER/TELFORD !, and presumably, shown as Williamina R K TELFORD in 1906.
No indication in 1879 of her father's name. I'd read her mother's deceased husband's occupation as 'Drainer', - the old style Scots capital 'D' can sometimes appear to be lower case in modern terms.
Coming forward to wee Matthew's 1897 birth this is several decades prior to the introduction in Scotland of a formal legal process of adoption; but it's worth a look at local institutions of the era and whether any records are extant.
Failing any positive outcome from such an institutional research, it's near certain that there would be a family link in terms of the adoption, even if that link only involves close neighbors or friends, possibly with a kirk connection.
As regards his father's age, there was many a young lass seduced by an older man, so any search for a McGILL candidate should take that into account, however likely it is that the father was someone close to Williamina's age.
While the use of the father's surname as a middle name in such a situation was quite usual, it might also be a family surname, or the surname or someone else connected with the birth, such as a minister, doctor, or midwife ........
ibi