(A) Let $r$ be the radius of the circle and $a$ be the side of the square.
Given the sum of perimeters is constant $k$:
$2 \pi r + 4a = k$
Solving for $a$:
$a = \frac{k - 2 \pi r}{4}$
The sum of the areas $A$ is:
$A = \pi r^2 + a^2 = \pi r^2 + \left( \frac{k - 2 \pi r}{4} \right)^2$
Differentiating $A$ with respect to $r$:
$\frac{dA}{dr} = 2 \pi r + 2 \left( \frac{k - 2 \pi r}{4} \right) \left( -\frac{2 \pi}{4} \right) = 2 \pi r - \frac{\pi(k - 2 \pi r)}{4}$
Setting $\frac{dA}{dr} = 0$ for critical points:
$2 \pi r = \frac{\pi(k - 2 \pi r)}{4}$
$8r = k - 2 \pi r$
$r(8 + 2 \pi) = k \Rightarrow r = \frac{k}{2(4 + \pi)}$
Checking the second derivative:
$\frac{d^2A}{dr^2} = 2 \pi + \frac{2 \pi^2}{4} = 2 \pi + \frac{\pi^2}{2} > 0$
Since the second derivative is positive,the area is minimum at this value of $r$.
Substituting $r$ back into the expression for $a$:
$a = \frac{k - 2 \pi \left( \frac{k}{2(4 + \pi)} \right)}{4} = \frac{k(4 + \pi) - \pi k}{4(4 + \pi)} = \frac{4k}{4(4 + \pi)} = \frac{k}{4 + \pi}$
Comparing $a$ and $r$:
$a = \frac{k}{4 + \pi}$ and $2r = 2 \left( \frac{k}{2(4 + \pi)} \right) = \frac{k}{4 + \pi}$
Thus,$a = 2r$. The sum of the areas is least when the side of the square is double the radius of the circle.