Given a square $ABCD$ with side $1$, and a square inside $ABCD$ with side $x$, find (in terms of $x$) the radio $r$ of the circle tangent to two sides of $ABCD$ and touches the square with side $x$. (See picture).
1. **Identify the key elements and relationships:**
   - The side length of the larger square \(ABCD\) is 1.
   - The side length of the smaller square inside \(ABCD\) is \(x\).
   - The radius of the circle tangent to two sides of \(ABCD\) and touching the smaller square is \(r\).

2. **Understand the geometric configuration:**
   - The circle is tangent to two sides of the larger square \(ABCD\).
   - The circle touches the smaller square at one point.
   - The diagonal of the larger square \(ABCD\) passes through the center of the circle and the point of contact between the circle and the smaller square.

3. **Set up the equation based on the given information:**
   - The diagonal of the larger square \(ABCD\) is \(\sqrt{2}\).
   - The distance from the center of the circle to the point of contact with the smaller square is \(r\sqrt{2}\).
   - The distance from the center of the circle to the point of tangency with the sides of the larger square is \(r\).
   - The distance from the center of the circle to the point of contact with the smaller square along the diagonal is \(x\sqrt{2}\).

4. **Combine these distances to form the equation:**
   \[
   r\sqrt{2} + r + x\sqrt{2} = \sqrt{2}
   \]

5. **Solve for \(r\):**
   \[
   r\sqrt{2} + r + x\sqrt{2} = \sqrt{2}
   \]
   \[
   r(\sqrt{2} + 1) + x\sqrt{2} = \sqrt{2}
   \]
   \[
   r(\sqrt{2} + 1) = \sqrt{2} - x\sqrt{2}
   \]
   \[
   r(\sqrt{2} + 1) = \sqrt{2}(1 - x)
   \]
   \[
   r = \frac{\sqrt{2}(1 - x)}{\sqrt{2} + 1}
   \]

6. **Simplify the expression for \(r\):**
   \[
   r = \frac{\sqrt{2}(1 - x)}{\sqrt{2} + 1}
   \]
   Rationalize the denominator:
   \[
   r = \frac{\sqrt{2}(1 - x)}{\sqrt{2} + 1} \cdot \frac{\sqrt{2} - 1}{\sqrt{2} - 1}
   \]
   \[
   r = \frac{\sqrt{2}(1 - x)(\sqrt{2} - 1)}{(\sqrt{2} + 1)(\sqrt{2} - 1)}
   \]
   \[
   r = \frac{\sqrt{2}(1 - x)(\sqrt{2} - 1)}{2 - 1}
   \]
   \[
   r = \sqrt{2}(1 - x)(\sqrt{2} - 1)
   \]
   \[
   r = (1 - x)(2 - \sqrt{2})
   \]

The final answer is \(\boxed{(1 - x)(2 - \sqrt{2})}\)