A separating polygon separating a set of points $S$ from a set of points $T$ is a simple polygonal circuit $P$ for which every point of $S$ is interior or on the boundary of $P$, and every points of $T$ is exterior or on the boundary of $P$. Let $D(P)$ denote the perimeter of a polygon $P$, that is, the sum of the Euclidean lengths of the edges of $P$. If $P$ is a separating polygon for $S$ and $T$ with minimum value of $D(P)$, then $P$ is called a minimum separating polygon.
The problem you describe is known as the minimum separating polygon problem (MSP), formally:
Instance: Two finite point sets $S$ and $T$, and an integer $k$.
Question: Is there a separating polygon $P$ for the sets $S$ and $T$ such that $D(P) \leq k$?
MSP is NP-hard. The hardness was first shown by Eades and Rappaport by a reduction from TSP, see , Section 2 for the reduction.
 Eades, Peter, and David Rappaport. "The complexity of computing minimum separating polygons." Pattern Recognition Letters 14.9 (1993): 715-718.