The matrix equation \( AX = B \) can be solved by substituting each option for \( X \) and checking if the equation holds.
Compute \( AX \) for \( X = \begin{bmatrix} 4 \\ 2 \\ 1 \end{bmatrix} \): \[ A = \begin{bmatrix} 1 & -1 & 0 \\ 0 & 1 & -1 \\ 1 & 1 & 1 \end{bmatrix}, \quad X = \begin{bmatrix} 4 \\ 2 \\ 1 \end{bmatrix}. \]
Perform the matrix multiplication: \[ AX = \begin{bmatrix} 1 & -1 & 0 \\ 0 & 1 & -1 \\ 1 & 1 & 1 \end{bmatrix} \cdot \begin{bmatrix} 4 \\ 2 \\ 1 \end{bmatrix} = \begin{bmatrix} (1)(4) + (-1)(2) + (0)(1) \\ (0)(4) + (1)(2) + (-1)(1) \\ (1)(4) + (1)(2) + (1)(1) \end{bmatrix}. \]
Simplify the resulting vector: \[ AX = \begin{bmatrix} 4 - 2 + 0 \\ 0 + 2 - 1 \\ 4 + 2 + 1 \end{bmatrix} = \begin{bmatrix} 2 \\ 1 \\ 7 \end{bmatrix}. \]
Since \( AX = B \), the solution \( X = \begin{bmatrix} 4 \\ 2 \\ 1 \end{bmatrix} \) is valid.
Thus, the correct answer is (D).