Please show all work for both questions thank you

21) The perimeter of a square is P=4s where s is the side length. Since all the sides of a square are of equal length, we know that the side lengths must be 12 because if we made the square into two 45-45-90 triangles, the hypotenuse is equal to the side length times the square root of 2. So we do the inverse to get a side length of 12. Now we can do P=4(12) to get a perimeter of 48 units.
22) Now we're doing the opposite. We already have the perimeter, so we need one side length, and that's done by s=P/4 which would be s=48/4 or s=12. Remember that in a 45-45-90 triangle, the hypotenuse is equal to the side length times the square root of 2. So 12*sqrt(2) is 12sqrt(2) miles, and that's your square's diagonal length (coincidentally the same as the previous problem, but just in different units).
Hope these explanations made sense!