Concept:
The standard symmetrical form of a line equation in 3D geometry is given by:
\[
\frac{x - x_1}{a} = \frac{y - y_1}{b} = \frac{z - z_1}{c}
\]
where $a, b, c$ are the direction ratios of the line. The corresponding direction cosines $(l, m, n)$ are found by dividing each ratio by the total magnitude $\sqrt{a^2 + b^2 + c^2}$.
Step 1: Convert the given line equation into standard symmetrical form.
The given equations are:
\[
x = y = 1 - z
\]
We rewrite this so that the variables $x, y,$ and $z$ all have a leading coefficient of $+1$:
- $x$ can be written as $\frac{x - 0}{1}$
- $y$ can be written as $\frac{y - 0}{1}$
- $1 - z$ can be written as $-(z - 1)$, which is equivalent to $\frac{z - 1}{-1}$
Equating them all in standard structure:
\[
\frac{x - 0}{1} = \frac{y - 0}{1} = \frac{z - 1}{-1}
\]
Step 2: Identify the direction ratios.
By comparing this with the standard symmetrical form, the direction ratios $(a, b, c)$ are the denominators:
\[
a = 1, \quad b = 1, \quad c = -1
\]
Step 3: Convert the direction ratios to direction cosines.
First, find the normalizing factor $\sqrt{a^2 + b^2 + c^2}$:
\[
\sqrt{1^2 + 1^2 + (-1)^2} = \sqrt{1 + 1 + 1} = \sqrt{3}
\]
Now, the direction cosines $(l, m, n)$ are computed as:
\[
l = \frac{a}{\sqrt{a^2+b^2+c^2}} = \frac{1}{\sqrt{3}}
\]
\[
m = \frac{b}{\sqrt{a^2+b^2+c^2}} = \frac{1}{\sqrt{3}}
\]
\[
n = \frac{c}{\sqrt{a^2+b^2+c^2}} = \frac{-1}{\sqrt{3}}
\]
Thus, the direction cosines are $\left(\frac{1}{\sqrt{3}}, \frac{1}{\sqrt{3}}, -\frac{1}{\sqrt{3}}\right)$, matching option (B).