For two lines:
\[
\vec{b}_1 = (3, 5, 4), \quad \vec{b}_2 = (1, 1, 2).
\]
The angle \( \theta \) is given by:
\[
\cos \theta = \frac{\vec{b}_1 \cdot \vec{b}_2}{|\vec{b}_1||\vec{b}_2|}.
\]
Substitute \( \vec{b}_1 \cdot \vec{b}_2 = 3 \cdot 1 + 5 \cdot 1 + 4 \cdot 2 = 16 \), \( |\vec{b}_1| = \sqrt{3^2 + 5^2 + 4^2} = \sqrt{50} \), \( |\vec{b}_2| = \sqrt{1^2 + 1^2 + 2^2} = \sqrt{6} \). Then:
\[
\cos \theta = \frac{16}{\sqrt{50} \cdot \sqrt{6}}.
\]