There's a strong possibility they were simply two unrelated people with the same last name. Barrie is a relatively common surname, especially in Scotland.
To be sure, you would need to investigate further into their family trees and look for documented connections. However, without any specific information about their families, it's safe to assume they were not related.