I have the following cases where rectangles overlap.

I have the coordinates for the intersection rectangle(Blue). How can i offset the starting coordinates(top-left X-Y) of the 2 rectangles to prevent overlapping,provided that i have the coordinates of the intersection rectangle.