Step 1: Direction cosines and equations.
The direction cosines of the lines satisfy:
1. \( l - 2m + n = 0 \),
2. \( lm + 10mn - 2nl = 0 \).
From the first equation:
$$
l = 2m - n.
$$
Substitute \( l = 2m - n \) into the second equation:
$$
(2m - n)m + 10mn - 2n(2m - n) = 0.
$$
Simplify:
$$
2m^2 - mn + 10mn - 4mn + 2n^2 = 0,
$$
$$
2m^2 + 5mn + 2n^2 = 0.
$$
Factorize:
$$
(2m + n)(m + 2n) = 0.
$$
Thus:
$$
2m + n = 0 \quad \text{or} \quad m + 2n = 0.
$$
Step 2: Solve for direction cosines.
Case 1: \( 2m + n = 0 \Rightarrow n = -2m \).
Substitute \( n = -2m \) into \( l = 2m - n \):
$$
l = 2m - (-2m) = 4m.
$$
Thus, the direction ratios are proportional to \( (4m, m, -2m) \), or simplified as \( (4, 1, -2) \).
Case 2: \( m + 2n = 0 \Rightarrow m = -2n \).
Substitute \( m = -2n \) into \( l = 2m - n \):
$$
l = 2(-2n) - n = -4n - n = -5n.
$$
Thus, the direction ratios are proportional to \( (-5n, -2n, n) \), or simplified as \( (-5, -2, 1) \).
Step 3: Cosine of the angle between the lines.
The cosine of the angle \( \theta \) between two lines with direction ratios \( (a_1, b_1, c_1) \) and \( (a_2, b_2, c_2) \) is given by:
$$
\cos \theta = \frac{a_1a_2 + b_1b_2 + c_1c_2}{\sqrt{a_1^2 + b_1^2 + c_1^2} \cdot \sqrt{a_2^2 + b_2^2 + c_2^2}}.
$$
For direction ratios \( (4, 1, -2) \) and \( (-5, -2, 1) \):
$$
\cos \theta = \frac{(4)(-5) + (1)(-2) + (-2)(1)}{\sqrt{4^2 + 1^2 + (-2)^2} \cdot \sqrt{(-5)^2 + (-2)^2 + 1^2}}.
$$
Simplify the numerator:
$$
(4)(-5) + (1)(-2) + (-2)(1) = -20 - 2 - 2 = -24.
$$
Simplify the denominators:
$$
\sqrt{4^2 + 1^2 + (-2)^2} = \sqrt{16 + 1 + 4} = \sqrt{21},
$$
$$
\sqrt{(-5)^2 + (-2)^2 + 1^2} = \sqrt{25 + 4 + 1} = \sqrt{30}.
$$
Thus:
$$
\cos \theta = \frac{-24}{\sqrt{21} \cdot \sqrt{30}} = \frac{-24}{\sqrt{630}} = \frac{-24}{3\sqrt{70}} = -\frac{8}{\sqrt{70}}.
$$
Since \( \cos \theta \) must be positive (as angles between lines are measured in \( [0, \pi] \)):
$$
\cos \theta = \frac{8}{\sqrt{70}}.
$$
Step 4: Final Answer.
$$
\boxed{\frac{8}{\sqrt{70}}}
$$