Let $a, b$ be positive real numbers, and let $x, y$ be complex numbers such that $|x| = a$ and $|y| = b$. Find the minimal and maximal value of
\[\left|\frac{x + y}{1 + x\overline{y}}\right|\]
1. **Express \( x \) and \( y \) in polar form:**
   Let \( x = ae^{is} \) and \( y = be^{it} \), where \( a = |x| \) and \( b = |y| \).

2. **Calculate the modulus of the given expression:**
   \[
   P = \left|\frac{x + y}{1 + x\overline{y}}\right|
   \]
   Since \( \overline{y} = be^{-it} \), we have:
   \[
   P = \left|\frac{ae^{is} + be^{it}}{1 + abe^{i(s-t)}}\right|
   \]

3. **Simplify the numerator and the denominator:**
   \[
   P^2 = \left|\frac{ae^{is} + be^{it}}{1 + abe^{i(s-t)}}\right|^2 = \frac{(ae^{is} + be^{it})(ae^{-is} + be^{-it})}{(1 + abe^{i(s-t)})(1 + abe^{-i(s-t)})}
   \]

4. **Expand the numerator and the denominator:**
   \[
   (ae^{is} + be^{it})(ae^{-is} + be^{-it}) = a^2 + b^2 + ab(e^{i(s-t)} + e^{-i(s-t)})
   \]
   \[
   (1 + abe^{i(s-t)})(1 + abe^{-i(s-t)}) = 1 + a^2b^2 + ab(e^{i(s-t)} + e^{-i(s-t)})
   \]

5. **Introduce a new variable for simplification:**
   Let \( u = e^{i(s-t)} + e^{-i(s-t)} = 2\cos(s-t) \), where \( u \in [-2, 2] \).

6. **Rewrite the expression in terms of \( u \):**
   \[
   P^2 = \frac{a^2 + b^2 + abu}{1 + a^2b^2 + abu}
   \]

7. **Analyze the function \( f(u) = \frac{a^2 + b^2 + abu}{1 + a^2b^2 + abu} \):**
   \[
   P^2 = 1 - \frac{(a^2 - 1)(b^2 - 1)}{1 + a^2b^2 + abu}
   \]

8. **Determine the conditions for \( P \):**
   - If \( (a^2 - 1)(b^2 - 1) > 0 \), then \( P_{\text{max}} = \frac{a + b}{1 + ab} \).
   - If \( (a^2 - 1)(b^2 - 1) < 0 \), then \( P_{\text{max}} = \frac{|a - b|}{|1 - ab|} \).
   - If \( (a^2 - 1)(b^2 - 1) = 0 \), then \( P = 1 \).

The final answer is \( \boxed{\frac{a + b}{1 + ab}} \) or \( \boxed{\frac{|a - b|}{|1 - ab|}} \) or \( \boxed{1} \) depending on the conditions.