5. Let $p, q$ be prime numbers, and $n$ be a positive integer, satisfying
$$
\frac{p}{p+1}+\frac{q+1}{q}=\frac{2 n}{n+2} \text {. }
$$

Find all possible values of $q-p$.
5. Subtract 2 from both sides of the equation to get
$$
\frac{1}{p+1}-\frac{1}{q}=\frac{4}{n+2} \text {. }
$$

Since \( n \) is a positive integer, the left side of the equation is greater than 0.
Therefore, \( q > p + 1 \).
Since \( q \) is a prime number, then \( (q, p+1) = 1 \).
Simplifying equation (1) by finding a common denominator, we get
$$
\frac{q-p-1}{q(p+1)}=\frac{4}{n+2} \text {. }
$$

It is easy to see that \( (q, q-p-1) = (q, p+1) = 1 \),
$$
(p+1, q-p-1) = (p+1, q) = 1 \text {. }
$$

Therefore, the left side of the equation is in its simplest form.
Thus, \( q-p-1 \) is a divisor of 4.
Hence, \( q-p-1 = 1, 2, 4 \Rightarrow q-p = 2, 3, 5 \).
Upon verification, the above cases are respectively obtained when
$$
(p, q, n) = (3, 5, 78), (2, 5, 28), (2, 7, 19)
$$