Pergunta de entrevista da empresa Rakuten

Find the overlapping area between two rectangles.