Let $f(x) = \|x-q\|_2$, then we need to solve
$\min_x \psi(x)$, where $\psi(x) = f(x)+{1 \over 2 \lambda} \|x-y\|_2^2$. The subgradient is
$\partial \psi(x) = \partial f(x) + {1 \over \lambda}\{x-y\}$.
You should verify that a solution exists and is unique for any $y$. Note that
since the problem is convex, the first order conditions are necessary and sufficient.
It is not difficult to compute
$\partial f(x) = \begin{cases} \overline{B(0,1)}, & x=q,\\
{x-q \over \|x-q\|}, & \text{otherwise}.\end{cases}$. Note that $\|\xi\| \le 1$ for all $\xi \in \partial f(x)$.
Then $x$ solves the problem iff $0 \in \partial \psi(x)$ iff
$\xi +{1 \over \lambda}(x-y) = 0 $ for some $\xi \in \partial f(x)$.
Suppose $\|y-q\| \le \lambda$, then there is some $\xi \in \partial f(q)$ such that $\xi +{1 \over \lambda}(q-y) = 0 $ and so $\operatorname{prox}_{\lambda f}(y) = q$.
if $\|y-q\| > \lambda$, then the minimising $x$ is not equal to $q$ and so $\partial f(x) = \{ {x-q \over \|x-q\|} \}$.
We can guess that the minimiser satisfies $x=tq+(1-t)y$ for some $t \neq 0$, and working through the details shows that setting $t={\lambda \over \|q-y\|_2}$ results in the minimiser $\operatorname{prox}_{\lambda f}(y)=y + {\lambda \over \|q-y\|_2} (q-y)$.
With a slight abuse of notation, we have $\operatorname{prox}_{\lambda f}(y)=y + \min(1,{\lambda \over \|q-y\|_2}) (q-y)$.