In a geometry class, students are learning about different 2-dimensional shapes. One student draws the following shapes:
1. A square with a perimeter of 20 units.
2. A rectangle that has a length of 6 units and an unknown width.
If the area of the rectangle is equal to the area of the square, what is the width of the rectangle?
Remember the formulas for perimeter and area. The perimeter of a square is given by $$P = 4s$$, where $$s$$ is the length of a side. The area of a square is given by $$A = s^2$$, and the area of a rectangle is given by $$A = l \times w$$, where $$l$$ is the length and $$w$$ is the width.