Let the indices $\{1, \ldots, p\}$ be partitioned into $M$ groups $\{1, \ldots, p\}=\cup_{j=1}^M G_j$ and let $\lambda^{(1)}, \ldots, \lambda^{(M)}$ be $M$ positive real numbers. We give in this exercise an explicit solution to the minimization problem
(1)
\begin{align} \widehat{\beta} \in \underset{\beta \in \mathbb{R}^p}{\operatorname{argmin}} \left\{ \| \alpha -\beta \|^2 + \sum_{j=1}^M \left( \lambda^{(j)} \right)^2 \mathbf{1}_{\beta_{G_j} \neq 0} \right\} . \end{align}
1. First, we check that a solution to the minimization problem $\min _{\beta \in \mathbb{R}^p} \left\{\| \alpha - \beta \|^2 + \lambda^2 \mathbf{1}_{\beta \neq 0} \right\}$ is given by $\widehat{\beta} := \alpha \mathbf{1}_{\|\alpha\|>\lambda}$.
We see that:
(2)
\begin{aligned} \| \alpha - \widehat{\beta} \|^2 + \lambda^2 \mathbf{1}_{\widehat{\beta} \neq 0} &= \| \alpha \|^2 \mathbf{1}_{\|\alpha\| \leq \lambda} + \lambda^2 \mathbf{1}_{\|\alpha\| > \lambda} \\ &= \min ( \| \alpha \|, \lambda ) \end{aligned}
whereas for any $\beta \in \mathbb{R}^p$:
(3)
\begin{aligned} \| \alpha - \beta \|^2 + \lambda^2 \mathbf{1}_{\beta \neq 0} &\geq \| \alpha \|^2 \mathbf{1}_{\beta = 0} + \lambda^2 \mathbf{1}_{\beta \neq 0} \\ &\geq \min ( \| \alpha \|, \lambda ) \end{aligned}
2. Let us denote the objective function:
(4)
\begin{align} \Phi: \beta \in \mathbb{R}^p \mapsto \| \alpha -\beta \|^2 + \sum_{j=1}^M \left( \lambda^{(j)} \right)^2 \mathbf{1}_{\beta_{G_j} \neq 0} \end{align}
Using the decomposition:
(5)
\begin{align} \|\alpha-\beta\|^2=\sum_{j=1}^M\left\|\alpha_{G_j}-\beta_{G_j}\right\|^2 \end{align}
we can split the objective function:
(6)
\begin{align} \Phi (\beta) = \sum_{j=1}^M \Phi_j (\beta_{G_j}) \end{align}
where:
(7)
\begin{align} \Phi_j: \beta_j \in \mathbb{R}^{|G_j|} \mapsto \| \alpha_{G_j} - \beta_j \|^2 + \left( \lambda^{(j)} \right)^2 \mathbf{1}_{\beta_j \neq 0} \end{align}
is the same form than in Question 1, so admits $\widehat{\beta}_j = \alpha_{G_j} \mathbf{1}_{\| \alpha_{G_j} \| > \lambda^{(j)}}$ as solution.
Then, if we denote $\widehat{\beta} = H_\lambda^G (\alpha)$ where:
(8)
\begin{align} \left[H_\lambda^G(\alpha)\right]_{G_j} = \widehat{\beta}_j \end{align}
we have for all $\beta \in \mathbb{R}^p$:
(9)
\begin{align} \Phi (\widehat{\beta}) = \sum_{j=1}^M \Phi_j (\widehat{\beta}_{G_j}) \leq \sum_{j=1}^M \Phi_j (\beta_{G_j}) = \Phi (\beta) \end{align}
which concludes the proof.