I have read posts of other people request something similar and I don’t believe that a perfect solution exists.
First you would have to build the network with a note for each person. Links only have to be in one direction, but they can be in both directions.
One limited but possible way to analyze connections between any two given individuals would be to start by opening the note of Person A and then open its local graph view.
With the connection level still set at 1, you can inspect the connected nodes to see if Person B is visible, which I am guessing is not the case in the scenario you described.
Next, you could add a temporary link to Person B within the Person A note. At this point you can crank up the connections level to its max which is currently 5.
Next, you could hopefully quickly find Person B, which should not be too difficult since it is directly connected. When you hover cursor over the node for Person A, the level 1 connections should highlight. You can click and drag Person B away from the center, holding it in place on the outer bounds while you watch the graph adjust and try to inspect the related connections.
If the graph is too busy at level 5 and there does not appear to be a chain of 3 nodes between Person A and Person B, it wouldn’t make a difference if you turned down the levels to 4. And, if turning down the levels to 3 or 2 doesn’t make a difference, you will be much better off analyzing the connections.
While dragging Person B to the outer bounds, you can take a screenshot. Depending on the busyness of the graph, you should be alright zooming in on the screenshot and inspecting the relationships. You can also open a separate local graph view for Person B and any nodes in between.
I am guessing you were looking for something more automated and elegant, but this could get you started. I would also guess that in the next few days you will probably get some help and a definitive answer about the current and potential future capabilities of Obsidian for your goal.
Good luck. I am interested to see what others say.