Hi I think I can help you with this as it's part of my family
Mary Heslop born 1817 (married to John Grieveson is the cousin to Dorothy born 1830 who married James Bambrough.
Mary Grieveson (Mary Heslop's daughter) born in 1846 is a 1st cousin once removed or something like that to Dorothy.
So yes they are related.