Let $$I$$ denote the $$2\times2$$ identity matrix.
Put $$C = A-\lambda I$$, so the given condition becomes $$C^{2}=B$$.
Compute $$C$$:
$$C = \begin{pmatrix}2-\lambda & 1 \\ 1 & 2-\lambda\end{pmatrix}$$
To find $$C^{2}$$, use the rule for squaring a $$2\times2$$ matrix $$\begin{pmatrix}p&q\\r&s\end{pmatrix}$$:
$$\begin{pmatrix}p^{2}+qr & q(p+s)\\ r(p+s) & rq+s^{2}\end{pmatrix}.$$
Here $$p=s=2-\lambda$$ and $$q=r=1$$, giving
$$C^{2}= \begin{pmatrix}(2-\lambda)^{2}+1 & 1\bigl[(2-\lambda)+(2-\lambda)\bigr] \\ 1\bigl[(2-\lambda)+(2-\lambda)\bigr] & (2-\lambda)^{2}+1\end{pmatrix}
= \begin{pmatrix}(2-\lambda)^{2}+1 & 2(2-\lambda)\\ 2(2-\lambda) & (2-\lambda)^{2}+1\end{pmatrix}.$$
We require this matrix to equal $$B=\begin{pmatrix}0&1\\1&0\end{pmatrix}$$, so equate corresponding entries:
Diagonal entries: $$(2-\lambda)^{2}+1 = 0$$
Off-diagonal entries: $$2(2-\lambda) = 1$$
Solve the off-diagonal equation first:
$$2(2-\lambda)=1 \;\Rightarrow\; 2-\lambda=\frac12 \;\Rightarrow\; \lambda = \frac32.$$
Now substitute $$\lambda=\frac32$$ into the diagonal equation:
$$(2-\tfrac32)^{2}+1 = \left(\tfrac12\right)^{2}+1 = \tfrac14+1 = \tfrac54 \neq 0.$$
Thus the diagonal condition is not satisfied.
The diagonal condition itself, $$(2-\lambda)^{2}+1=0$$, implies $$(2-\lambda)^{2}=-1,$$
so $$2-\lambda=\pm i,$$ which is purely imaginary.
That contradicts the value $$2-\lambda=\frac12$$ forced by the off-diagonal condition.
Hence there is no real or complex number $$\lambda$$ that satisfies both equations simultaneously.
Therefore, the number of possible distinct values of $$\lambda$$ is 0.
Answer: 0