Pergunta de entrevista da empresa Rifiniti

Outline an algorithm to find if two rectangles overlap. How would you compute the area if they overlap?