Concept:
- The angle at \(C\) in triangle \(ABC\) is the angle between \(\overrightarrow{CA}\) and \(\overrightarrow{CB}\); it is \(\dfrac\pi2\) iff \(\overrightarrow{CA}\cdot\overrightarrow{CB}=0\).
- For points with position vectors \(\vec p,\vec q\): \(\overrightarrow{PQ}=\vec q-\vec p\).
Step 1: Find the two side vectors at \(C\)
With \(A=(2,-1,1)\), \(B=(1,-3,-5)\) and \(C=(a,-3,1)\): \[ \overrightarrow{CA}=(2-a)\hat i+2\hat j+0\hat k,\qquad \overrightarrow{CB}=(1-a)\hat i+0\hat j-6\hat k . \]
Step 2: Impose the right angle at \(C\)
\[ \overrightarrow{CA}\cdot\overrightarrow{CB}=(2-a)(1-a)+2(0)+0(-6)=(a-2)(a-1)=0 . \] So \(a=1\) or \(a=2\).
Step 3: Verify the two values
For \(a=1\): \(\overrightarrow{CA}=(1,2,0)\) and \(\overrightarrow{CB}=(0,0,-6)\), dot product \(0\). For \(a=2\): \(\overrightarrow{CA}=(0,2,0)\) and \(\overrightarrow{CB}=(-1,0,-6)\), dot product \(0\). In both cases the triangle is non-degenerate and right-angled at \(C\).
Step 4: Why the other options fail
Options (B), (C) and (D) contain \(-2\) or \(-1\). For \(a=-1\), \(\overrightarrow{CA}\cdot\overrightarrow{CB}=(3)(2)=6\ne0\), and for \(a=-2\) it is \((4)(3)=12\ne0\). So negative values do not give a right angle at \(C\).
Step 5: Conclusion
\(a=1\) and \(a=2\). Hence, the correct option is (A).