I think that if you replace '=' with IN in Example A (https://learn.microsoft.com/en-us/sql/relational-databases/graphs/sql-graph-shortest-path?view=sql-server-ver15#examples), then it should work with multiple sources and targets, i.e. Person1.name IN ('Alice', 'Denice'), Q.LastNode IN ('Bob', 'Charles').
To show the shortest path of found paths, try something like this:
SELECT top(1) with ties PersonName, Friends, levels
FROM (
SELECT
Person1.name AS PersonName,
STRING_AGG(Person2.name, '->') WITHIN GROUP (GRAPH PATH) AS Friends,
LAST_VALUE(Person2.name) WITHIN GROUP (GRAPH PATH) AS LastNode,
COUNT(Person2.name) WITHIN GROUP (GRAPH PATH) AS levels
FROM
Person AS Person1,
friend FOR PATH AS fo,
Person FOR PATH AS Person2
WHERE MATCH(SHORTEST_PATH(Person1(-(fo)->Person2)+))
AND Person1.name in ('Alice', 'Denice')
) AS Q
WHERE Q.LastNode in ('Bob', 'Charles')
order by levels