This script handles the tracking of two draggable div and displays some position based data.
I updated a JSFiddle I found so that it colors in the overlapping area.
This is the original jsfiddle:
source-jsfiddle
I modified the layout and aded the requirements so that the overlapping area displays with an alternative background color.
Hopefully its useful as an example of how to use JavaScript to track element collisions.