Step 1: Understanding the given lines.
We are given the parametric equations for two lines:
1. \( \frac{x-1}{1} = \frac{y+1}{2} = \frac{z-3}{-1} \)
2. \( \frac{x-1}{2} = \frac{y-3}{3} = \frac{z-1}{4} \)
These can be written as vector forms:
1. \( (x_1, y_1, z_1) = (1, -1, 3), \quad \text{direction vector} = (1, 2, -1) \)
2. \( (x_2, y_2, z_2) = (1, 3, 1), \quad \text{direction vector} = (2, 3, 4) \)
Step 2: Finding the angle between the two lines.
The angle \( \theta \) between two lines is given by the formula:
\[
\cos \theta = \frac{\mathbf{v_1} \cdot \mathbf{v_2}}{|\mathbf{v_1}| |\mathbf{v_2}|},
\]
where \( \mathbf{v_1} \) and \( \mathbf{v_2} \) are the direction vectors of the lines.
Step 3: Computing the dot product and magnitudes.
The direction vectors are \( \mathbf{v_1} = (1, 2, -1) \) and \( \mathbf{v_2} = (2, 3, 4) \). Compute the dot product:
\[
\mathbf{v_1} \cdot \mathbf{v_2} = (1)(2) + (2)(3) + (-1)(4) = 2 + 6 - 4 = 4.
\]
Now compute the magnitudes of the vectors:
\[
|\mathbf{v_1}| = \sqrt{1^2 + 2^2 + (-1)^2} = \sqrt{1 + 4 + 1} = \sqrt{6},
\]
\[
|\mathbf{v_2}| = \sqrt{2^2 + 3^2 + 4^2} = \sqrt{4 + 9 + 16} = \sqrt{29}.
\]
Step 4: Using the angle formula.
Now substitute the dot product and magnitudes into the angle formula:
\[
\cos \theta = \frac{4}{\sqrt{6} \times \sqrt{29}} = \frac{4}{\sqrt{174}}.
\]
Simplify:
\[
\cos \theta = \frac{2}{3}.
\]
Final Answer:
Thus, the angle between the two lines is:
\[
\boxed{\cos^{-1} \left( \frac{2}{3} \right)}.
\]