What have you tried?

To visualize the condition you want to detect, use a piece of graph paper and draw the cars to scale in various positions to see what x,y and width and height values need to...