Is this a competition or lookout for hints/code?
You propably aim to find a function fast enough for realtime game? I can think of at least 2 solutions:

Common for both solutions at first:
- Rectangular check for min/max of both polygons, see if their bounding rectangles collide. This will speed up the program by eliminating distant ones.

1) Check line-line intersection for each edge in both polygons. Accurate but you need extra measures to check if other polygon is inside.

2) Virtual pixel map. You can "draw" both polygons (filled can be trickier unless you use something ready like propably slow TBitmap) on a 2 dimensional array and stop "drawing" on first pixel that overlaps. The bigger the resolution the slower it gets but the rougher the bordering areas are.