For any line in 3-D, its direction cosines \(l,m,n\) satisfy
\[
l^{2}+m^{2}+n^{2}=1 \text{(unit vector condition).}
\]
Here \(l=\dfrac{4}{\sqrt{77}},\ m=\dfrac{5}{\sqrt{77}},\ n=\dfrac{x}{\sqrt{77}}\).
So
\[
\left(\frac{4}{\sqrt{77}}\right)^{2}+\left(\frac{5}{\sqrt{77}}\right)^{2}+\left(\frac{x}{\sqrt{77}}\right)^{2}=1
\]
\[
\frac{16+25+x^{2}}{77}=1 \ \Rightarrow\ 16+25+x^{2}=77\ \Rightarrow\ x^{2}=36.
\]
Hence \(x=\pm 6\). Among the choices the matching value is \(6\).