5. $\pm \frac{11}{6}$.

From equation (1), we know that $x, y, z$ have the same sign. Without loss of generality, let's first consider the case where they are all positive.

Let $x=\tan \frac{\alpha}{2}, y=\tan \frac{\beta}{2}, z=\tan \frac{\gamma}{2}$, where $\alpha, \beta, \gamma \in (0, \pi)$.
Notice that,
$$
\begin{array}{l}
\tan \frac{\theta}{2} + \cot \frac{\theta}{2} \\
= \frac{\sin \frac{\theta}{2}}{\cos \frac{\theta}{2}} + \frac{\cos \frac{\theta}{2}}{\sin \frac{\theta}{2}} \\
= \frac{1}{\sin \frac{\theta}{2} \cdot \cos \frac{\theta}{2}} \\
= \frac{2}{\sin \theta}.
\end{array}
$$

Thus, equation (1) transforms into
$$
\frac{3}{\sin \alpha} = \frac{4}{\sin \beta} = \frac{5}{\sin \gamma},
$$

and equation (2) transforms into
$$
\begin{array}{l}
\tan \frac{\alpha}{2} \cdot \tan \frac{\beta}{2} + \tan \frac{\beta}{2} \cdot \tan \frac{\gamma}{2} + \tan \frac{\gamma}{2} \cdot \tan \frac{\alpha}{2} = 1 \\
\Rightarrow \tan \frac{\gamma}{2} \cdot \left( \tan \frac{\alpha}{2} + \tan \frac{\beta}{2} \right) \\
= 1 - \tan \frac{\alpha}{2} \cdot \tan \frac{\beta}{2} \\
\Rightarrow \tan \frac{\gamma}{2} = \frac{1 - \tan \frac{\alpha}{2} \cdot \tan \frac{\beta}{2}}{\tan \frac{\alpha}{2} + \tan \frac{\beta}{2}} \\
= \cot \left( \frac{\alpha}{2} + \frac{\beta}{2} \right) = \tan \left( \frac{\pi}{2} - \frac{\alpha + \beta}{2} \right). \\
\text{Since } \frac{\gamma}{2} \in \left(0, \frac{\pi}{2}\right), \frac{\pi}{2} - \frac{\alpha + \beta}{2} \in \left(0, \frac{\pi}{2}\right) \\
\Rightarrow \frac{\gamma}{2} = \frac{\pi}{2} - \frac{\alpha + \beta}{2}, \alpha + \beta + \gamma = \pi.
\end{array}
$$

Since $\alpha, \beta, \gamma$ are the three interior angles of a triangle, and the ratio of its three sides is $3:4:5$, we have
$$
\sin \gamma = 1, \sin \alpha = \frac{3}{5}, \sin \beta = \frac{4}{5}.
$$

Thus, $x = \tan \frac{\alpha}{2} = \frac{1}{3}$,
$$
\begin{array}{l}
y = \tan \frac{\beta}{2} = \frac{1}{2}, \\
z = \tan \frac{\gamma}{2} = 1.
\end{array}
$$

If $x, y, z$ are all negative, similarly we get
$$
x = -\frac{1}{3}, y = -\frac{1}{2}, z = -1.
$$

In summary, the solutions to the original system of equations are
$$
(x, y, z) = \left( \frac{1}{3}, \frac{1}{2}, 1 \right) \text{ or } \left( -\frac{1}{3}, -\frac{1}{2}, -1 \right).
$$

Therefore, $x + y + z = \pm \frac{11}{6}$.
5. Given $x, y, z$ satisfy:
$$
\begin{array}{l}
3\left(x+\frac{1}{x}\right)=4\left(y+\frac{1}{y}\right)=5\left(z+\frac{1}{z}\right), \\
x y+y z+z x=1 .
\end{array}
$$

Then $x+y+z=$ $\qquad$