Find all pairs of positive integers $(p; q) $such that both the equations $x^2- px + q = 0 $ and $ x^2 -qx + p = 0 $ have integral solutions.
To find all pairs of positive integers \((p, q)\) such that both the equations \(x^2 - px + q = 0\) and \(x^2 - qx + p = 0\) have integral solutions, we proceed as follows:

1. **Roots of the first equation:**
   The roots of the equation \(x^2 - px + q = 0\) are given by Vieta's formulas:
   \[
   a + b = p \quad \text{and} \quad ab = q
   \]
   where \(a\) and \(b\) are integers.

2. **Roots of the second equation:**
   Similarly, the roots of the equation \(x^2 - qx + p = 0\) are:
   \[
   c + d = q \quad \text{and} \quad cd = p
   \]
   where \(c\) and \(d\) are integers.

3. **Inequalities derived from positivity:**
   Since \(a, b, c, d > 0\), we have:
   \[
   (a-1)(b-1) \geq 0 \quad \Rightarrow \quad p - q + 1 \geq 0
   \]
   Similarly, from the second equation:
   \[
   (c-1)(d-1) \geq 0 \quad \Rightarrow \quad q - p + 1 \geq 0
   \]
   Combining these inequalities, we get:
   \[
   -1 \leq p - q \leq 1
   \]
   Thus, \(p - q \in \{-1, 0, 1\}\).

4. **Case 1: \(p = q\):**
   If \(p = q\), the equation \(x^2 - px + p = 0\) must have integer solutions. The discriminant of this quadratic equation must be a perfect square:
   \[
   D = p^2 - 4p = k^2 \quad \text{for some integer } k
   \]
   This implies:
   \[
   p^2 - 4p - k^2 = 0 \quad \Rightarrow \quad (p-2)^2 - k^2 = 4
   \]
   Factoring, we get:
   \[
   (p-2-k)(p-2+k) = 4
   \]
   The pairs \((p-2-k, p-2+k)\) that multiply to 4 and have the same parity are:
   \[
   (2, 2) \quad \text{or} \quad (-2, -2)
   \]
   Solving these, we get:
   \[
   p-2-k = 2 \quad \text{and} \quad p-2+k = 2 \quad \Rightarrow \quad p = 4
   \]
   For \(p = 4\), the equation \(x^2 - 4x + 4 = 0\) has the double root \(x = 2\), which is an integer.

5. **Case 2: \(p = q + 1\):**
   If \(p = q + 1\), the equation \(x^2 - px + q = 0\) must have integer solutions. Let the roots be \(1\) and \(q\):
   \[
   1 + q = p \quad \Rightarrow \quad p = q + 1
   \]
   The second equation becomes:
   \[
   x^2 - qx + (q + 1) = 0
   \]
   The discriminant must be a perfect square:
   \[
   D = q^2 - 4(q + 1) = k^2 \quad \Rightarrow \quad q^2 - 4q - 4 = k^2
   \]
   Factoring, we get:
   \[
   (q-2-k)(q-2+k) = 8
   \]
   The pairs \((q-2-k, q-2+k)\) that multiply to 8 and have the same parity are:
   \[
   (2, 4) \quad \text{or} \quad (-2, -4)
   \]
   Solving these, we get:
   \[
   q-2-k = 2 \quad \text{and} \quad q-2+k = 4 \quad \Rightarrow \quad q = 5
   \]
   Thus, \(p = q + 1 = 6\). The pair \((p, q) = (6, 5)\) satisfies the conditions.

6. **Case 3: \(p = q - 1\):**
   If \(p = q - 1\), the equation \(x^2 - qx + p = 0\) must have integer solutions. Let the roots be \(1\) and \(p\):
   \[
   1 + p = q \quad \Rightarrow \quad q = p + 1
   \]
   The first equation becomes:
   \[
   x^2 - px + (p + 1) = 0
   \]
   The discriminant must be a perfect square:
   \[
   D = p^2 - 4(p + 1) = k^2 \quad \Rightarrow \quad p^2 - 4p - 4 = k^2
   \]
   Factoring, we get:
   \[
   (p-2-k)(p-2+k) = 8
   \]
   The pairs \((p-2-k, p-2+k)\) that multiply to 8 and have the same parity are:
   \[
   (2, 4) \quad \text{or} \quad (-2, -4)
   \]
   Solving these, we get:
   \[
   p-2-k = 2 \quad \text{and} \quad p-2+k = 4 \quad \Rightarrow \quad p = 5
   \]
   Thus, \(q = p + 1 = 6\). The pair \((p, q) = (5, 6)\) satisfies the conditions.

Conclusion:
The pairs \((p, q)\) that satisfy the conditions are:
\[
(p, q) = (4, 4), (6, 5), (5, 6)
\]

The final answer is \( \boxed{ (p, q) = (4, 4), (6, 5), (5, 6) } \)