Skillsoft interview question

Write some pseudocode that detects the intersection of lines between two rectangles.