The direction ratios of the first line are \( (3, 5, 4) \), and for the second line, the direction ratios are \( (1, 1, 2) \).
The cosine of the angle \( \theta \) between the two lines is given by the formula:
\[
\cos \theta = \frac{\mathbf{l_1} \cdot \mathbf{l_2}}{|\mathbf{l_1}| |\mathbf{l_2}|}
\]
The dot product \( \mathbf{l_1} \cdot \mathbf{l_2} \) is:
\[
\mathbf{l_1} \cdot \mathbf{l_2} = 3 \times 1 + 5 \times 1 + 4 \times 2 = 3 + 5 + 8 = 16
\]
The magnitudes of the direction ratios are:
\[
|\mathbf{l_1}| = \sqrt{3^2 + 5^2 + 4^2} = \sqrt{9 + 25 + 16} = \sqrt{50}
\]
\[
|\mathbf{l_2}| = \sqrt{1^2 + 1^2 + 2^2} = \sqrt{1 + 1 + 4} = \sqrt{6}
\]
Now, calculate \( \cos \theta \):
\[
\cos \theta = \frac{16}{\sqrt{50} \times \sqrt{6}} = \frac{16}{\sqrt{300}} = \frac{8}{5\sqrt{3}}
\]
Thus, the angle is \( \cos^{-1} \left( \frac{8}{5\sqrt{3}} \right) \).