Using a date calculator, 68 years and 42 days before 2 October 1887 is 21 August 1819.
What evidence did the compiler of the Ancestry tree have to make them think that Richard was born in Inveresk?
I don't have any access to birth certificates etc
You have exactly the same access as everyone else, via Scotland's People
www.scotlandspeople.gov.uk, but as this is long before the start of civil registration in 1855, there isn't a birth certificate to look for. At best there could only be a baptism record.
I see that he is described as a pensioner. At that time, this usually means that he was in receipt of an Army or Navy pension, so I suggest looking for military records.
There is a record of Richard Hood, born in the parish of Gladsmuir, who enlisted at Edinburgh, aged 18, on 15 September 1835. He served in the East Indies and South Africa, and was discharged as unfit for further service at Grahamstown, Cape of Good Hope, on 26 May 1857.