Find distances from all the corner points of the inner polygon to all the lines in the outer polygon, from all the points in the outer polygon to all the lines in the inner polygon. Minimum of all the distances is the answer.