Step 1: Use the property of a circle.
If a point lies on a circle whose diameter endpoints are \(A\) and \(B\), then
\[
\angle APB = 90^\circ
\]
which implies
\[
\vec{PA} \cdot \vec{PB} = 0
\]
Step 2: Find vectors \(\vec{PA}\) and \(\vec{PB}\).
\[
\vec{PA} = (3-5,\,-2-6,\,2+1) = (-2,-8,3)
\]
\[
\vec{PB} = (2-5,\,\lambda+1-6,\,5+1) = (-3,\lambda-5,6)
\]
Step 3: Take dot product.
\[
(-2)(-3) + (-8)(\lambda-5) + (3)(6) = 0
\]
\[
6 - 8\lambda + 40 + 18 = 0
\Rightarrow 64 - 8\lambda = 0
\]
Step 4: Solve for \(\lambda\).
\[
\lambda = 8
\]