My problem is:
Let $G$ be a graph, and let $A, B ⊆ V (G)$ (not necessarily disjoint). Prove that the maximum number of pairwise vertex-disjoint $A$, $B$-paths in $G$ equals the minimum size of a set $S ⊆ V (G)$ (which may intersect $A$ and $B$) such that $G − S$ contains no $A$, $B$-path.
I believe this needs to be approached using Menger's theorem but I cannot figure out how to apply it to prove this. Any help would be appreciated.