A square piece of fabric has an area of 16x^2+40x+25 square inches. The length of each side of the fabric is cx+d, where c and d are whole numbers. Find an expression for the perimeter of the piece of fabric. Then find the perimeter when x=2.