3. As figure 1, two 3 by 4 rectangles overlap in such a way that their sides are perpendicular. If the area and perimeter of the shaded region are 22 and 20 respectively, compute length AB.