Answer
$x=5cm$
Work Step by Step
From the given information we know the following :
Let the first square be $A$ and the second $B$.
$P_A=x$
$P_B=10-x$
The side of the square $A$ is : $\frac{x}{4}$
The side of the square $B$ is : $\frac {10-x}{4}$
The total area will be the sum of the areas of both squares (which are squares of the sides) :
$A=\frac{x^2}{16}+\frac{(10-x)^2}{16}=\frac{x^2+100-20x+x^2}{16}=\frac{2x^2-20x+100}{16}=\frac{1}{8}x^2-\frac{5}{4}x+\frac{25}{4}$
We have :
$a=\frac{1}{8}$
$b=-\frac{5}{4}$
The minimum value of the area is at :
$x=-\frac{b}{2a}=-\frac{-\frac{5}{4}}{2\frac{1}{8}}=5$
$x=5cm$