from sectionproperties.pre.library import rectangular_section

rect1 = rectangular_section(d=400, b=200)
rect2 = rectangular_section(d=300, b=100).align_center(align_to=rect1)
(rect1 - rect2).plot_geometry()