Solve the system of equations: \[ x+y+z=a  \] \[ x^2+y^2+z^2=b^2  \] \[ xy=z^2  \] where $a$ and $b$ are constants. Give the conditions that $a$ and $b$ must satisfy so that $x,y,z$ are distinct positive numbers.
1. **Substitute \( z = \sqrt{xy} \) into the equations:**
   \[
   x + y + \sqrt{xy} = a
   \]
   Let \( x + y = p \) and \( \sqrt{xy} = q \). Then the equation becomes:
   \[
   p + q = a
   \]

2. **Simplify the second equation:**
   \[
   x^2 + y^2 + z^2 = b^2
   \]
   Using the identity \( x^2 + y^2 = (x + y)^2 - 2xy \), we get:
   \[
   x^2 + y^2 = p^2 - 2q^2
   \]
   Substituting \( z = q \), the equation becomes:
   \[
   p^2 - 2q^2 + q^2 = b^2 \implies p^2 - q^2 = b^2
   \]
   This can be factored as:
   \[
   (p + q)(p - q) = b^2
   \]
   Since \( p + q = a \), we have:
   \[
   a(p - q) = b^2 \implies p - q = \frac{b^2}{a}
   \]

3. **Solve for \( p \) and \( q \):**
   \[
   p = \frac{a + \frac{b^2}{a}}{2} = \frac{a^2 + b^2}{2a}
   \]
   \[
   q = \frac{a - \frac{b^2}{a}}{2} = \frac{a^2 - b^2}{2a}
   \]

4. **Find \( xy \):**
   \[
   xy = q^2 = \left( \frac{a^2 - b^2}{2a} \right)^2 = \frac{(a^2 - b^2)^2}{4a^2}
   \]

5. **Form the quadratic equation with roots \( x \) and \( y \):**
   \[
   t^2 - pt + xy = 0
   \]
   Substituting \( p \) and \( xy \):
   \[
   t^2 - \frac{a^2 + b^2}{2a}t + \frac{(a^2 - b^2)^2}{4a^2} = 0
   \]

6. **Solve the quadratic equation using the quadratic formula:**
   \[
   t = \frac{\frac{a^2 + b^2}{2a} \pm \sqrt{\left( \frac{a^2 + b^2}{2a} \right)^2 - 4 \cdot \frac{(a^2 - b^2)^2}{4a^2}}}{2}
   \]
   Simplifying inside the square root:
   \[
   t = \frac{\frac{a^2 + b^2}{2a} \pm \sqrt{\frac{(a^2 + b^2)^2 - (a^2 - b^2)^2}{4a^2}}}{2}
   \]
   \[
   t = \frac{\frac{a^2 + b^2}{2a} \pm \sqrt{\frac{4a^2b^2}{4a^2}}}{2}
   \]
   \[
   t = \frac{\frac{a^2 + b^2}{2a} \pm \frac{2b}{2a}}{2}
   \]
   \[
   t = \frac{a^2 + b^2 \pm 2b}{4a}
   \]
   Therefore, the solutions for \( x \) and \( y \) are:
   \[
   x, y = \frac{a^2 + b^2 \pm \sqrt{(3a^2 - b^2)(3b^2 - a^2)}}{4a}
   \]

7. **Conditions for distinct positive \( x, y, z \):**
   For \( x, y, z \) to be distinct positive numbers, the discriminant must be positive:
   \[
   (3a^2 - b^2)(3b^2 - a^2) > 0
   \]
   This implies:
   \[
   3a^2 > b^2 \quad \text{and} \quad 3b^2 > a^2
   \]
   Combining these inequalities, we get:
   \[
   \sqrt{3} |b| > a \quad \text{and} \quad a > |b|
   \]

The final answer is \( \boxed{ x, y = \frac{a^2 + b^2 \pm \sqrt{(3a^2 - b^2)(3b^2 - a^2)}}{4a}, z = \frac{a^2 - b^2}{2a} } \) for \( |b| < a < \sqrt{3}|b| \).