No, this is not right. There is no such thing as "family UID". All instances are in the family, and each instance has different own UID.
You can assign the same unique identifier to both instances, which you will need to generate and make sure it's unique.
But I think the easier solution is to declare one instance "parent" and another "child" and link the child to the parent using ParentUID.
If ParentUID=0, then this is a parent instance. If ParentUID>0, this is a child instance and you can easily find its parent.