The first square has a side of length 10 because perimeter=4*side and 40/4=10
Now the area of the circle is 64p and this is equal to pr^2 so
64p=pr^2
64=r^2
r=8
Now this circle has a diameter of 16 so its enclosing square must have sides of 16 as sell. So the side of the second square is 16.
The ratio of the first to that of the second is 10/16=5/8