There are some addon relationship filters; X and Y descendants and the same for ancestors. So you create a filter looking for the descendants of the ancestor and the ancestors of the presumed descendant. Set these filters as their own rule.
In a third filter you select for the results for both filters with “All rules must apply”. This will select only those people in both sets of filters.
The filter rules were discussed here.