Select the polygon shape tool. Click on the small arrow on the options tab at the top. Apply settings as shown.



Create this shape as shown below.



Enable "subtract from shape area" at the top bar.



Again create a shape as shown.



Enable "exclude overlapping shape areas" at the top bar.



Create the same shape again.



Enable "intersect shape area" at the top bar.