For two mutually perpendicular lines, the dot product of their direction ratios must be zero. Let's take the direction ratios of the first line as \( 5, 2, 4 \) and the second line as \( 4, 8, x \).
The condition for mutual perpendicularity is:
\[
5 \times 4 + 2 \times 8 + 4 \times x = 0.
\]
Simplifying:
\[
20 + 16 + 4x = 0 \quad \Rightarrow \quad 36 + 4x = 0 \quad \Rightarrow \quad 4x = -36 \quad \Rightarrow \quad x = -9.
\]
Thus, the correct answer is option (B).