If you have an algorithm for finding all the real zeros of any cubic polynomial, how do you find the real solutions to $x = p(y), y = p(x)$, where $p$ is a cubic polynomial?
1. **Normalization of the Polynomial:**
   - Given a cubic polynomial \( p(x) \), we can normalize it to a monic polynomial and ensure \( p(0) = 0 \) by appropriate transformations.
   - First, replace \( p(x) \) with \( c p\left(\frac{x}{c}\right) \) to make it monic. This transformation involves scaling and does not change the nature of the roots.
   - Next, replace \( p(x) \) with \( p(x+c) - c \) to ensure \( p(0) = 0 \). This transformation involves a shift and also does not change the nature of the roots.

2. **Form of the Polynomial:**
   - After normalization, we can assume \( p(x) \) is of the form \( x^3 + ax^2 + bx \).

3. **System of Equations:**
   - We need to solve the system:
     \[
     x^3 + ax^2 + bx = y
     \]
     \[
     y^3 + ay^2 + by = x
     \]

4. **Introducing New Variables:**
   - Let \( s = x + y \) and \( t = xy \). These are the elementary symmetric polynomials in \( x \) and \( y \).

5. **Summing and Subtracting the Equations:**
   - Summing the equations:
     \[
     x^3 + ax^2 + bx + y^3 + ay^2 + by = x + y
     \]
     \[
     s^3 - 3st + a(s^2 - 2t) + (b-1)s = 0
     \]
   - Subtracting the equations:
     \[
     (x - y)(x^2 + xy + y^2 + a(x + y) + b) = 0
     \]
     \[
     (x - y)(s^2 - t + as + b + 1) = 0
     \]

6. **Solving for \( x = y \):**
   - If \( x = y \), then we solve the cubic equation:
     \[
     p(x) - x = 0
     \]
     \[
     x^3 + ax^2 + (b-1)x = 0
     \]
   - This can be solved using standard methods for finding roots of cubic polynomials.

7. **Solving for \( x \neq y \):**
   - If \( x \neq y \), then:
     \[
     s^2 - t + as + b + 1 = 0
     \]
   - Substitute \( t = s^2 + as + b + 1 \) into the equation:
     \[
     s^3 - 3st + a(s^2 - 2t) + (b-1)s = 0
     \]
     \[
     s^3 - 3s(s^2 + as + b + 1) + a(s^2 - 2(s^2 + as + b + 1)) + (b-1)s = 0
     \]
   - Simplify and solve for \( s \):
     \[
     s^3 - 3s^3 - 3as^2 - 3bs - 3s + a(s^2 - 2s^2 - 2as - 2b - 2) + (b-1)s = 0
     \]
     \[
     -2s^3 - 3as^2 - 3bs - 3s + a(-s^2 - 2as - 2b - 2) + (b-1)s = 0
     \]
     \[
     -2s^3 - 3as^2 - 3bs - 3s - as^2 - 2a^2s - 2ab - 2a + (b-1)s = 0
     \]
     \[
     -2s^3 - 4as^2 - 4bs - 3s - 2ab - 2a = 0
     \]
   - Solve this cubic equation for \( s \).

8. **Finding \( t \):**
   - Once \( s \) is found, use:
     \[
     t = s^2 + as + b + 1
     \]

9. **Finding \( x \) and \( y \):**
   - Solve the quadratic equation:
     \[
     t = xy, \quad s = x + y
     \]
     \[
     x^2 - sx + t = 0
     \]
   - Use the quadratic formula:
     \[
     x, y = \frac{s \pm \sqrt{s^2 - 4t}}{2}
     \]

The final answer is \( \boxed{ x, y = \frac{s \pm \sqrt{s^2 - 4t}}{2} } \)