Two rectangles 5 decimeters long and 3 decimeters wide are stacked together to find the perimeter of the figure

Two rectangles 5 decimeters long and 3 decimeters wide are stacked together to find the perimeter of the figure

1. If the lengths of two rectangles coincide, the perimeter of the figure is:
(5 + 3) × 2 × 2-5 × 2 = 22 (decimeter)
2. If the widths of two rectangles coincide, the perimeter of the figure obtained is:
(5 + 3) × 2 × 2-3 × 2 = 26 (decimeter)