Because you have CAPM therefore the following holds:
$$r_i = r_f + \beta_i (r_M - r_f) + \epsilon_i$$
where $r_i$ is the expected return of stock $i$, $r_f$ is the risk free return and $r_M$ is the expected market return, and $\epsilon$ is an idiosyncratic return adjustment or an error.
Now if you take the $\text{Var}[\cdot]$ operator over the equation above you should have.
$$
\begin{split}
\text{Var}[r_i] & =\text{Var} \left [ r_f + \beta_i (r_M - r_f) + \epsilon_i \right ] \\
& = \text{Var}[r_f] + \beta_i^2 \text{Var} [r_M - r_f] + \text{Var} [\epsilon_i] \\
& = 0 + \beta_i^2 \text{Var} [r_M] + \text{Var} [\epsilon_i] \\
& = \beta_i^2 \text{Var} [r_M] + \text{Var} [\epsilon_i]
\end{split}
$$
This is the relation you're looking for, it's a decomposition of variance. (Notice there's no covariance terms by the assumption of CAPM). It tells you that the variance of your stock return is two-fold. First, it comes from the systematic risk where you bear from market risk, namely $\beta_i^2 \text{Var} [r_M]$. Second, each stock has its idiosyncratic risk, which is $\text{Var} [\epsilon_i]$.
Now in this problem you have $\beta_i$, $\text{Var} [r_M]$ and $\text{Var}[r_i]$ given. What percentage of this variance is due to market risk you ask? That's just
$$\frac{\beta_i^2 \text{Var} [r_M]}{\text{Var}[r_i]}$$
Now if you want to be even more convenient. You can re-write the above relation as
$$\frac{\beta_i^2 \text{Var} [r_M]}{\text{Var}[r_i]} = \frac{\text{Cov}^2[r_i,r_M]}{\text{Var} [r_M] \text{Var} [r_i]} = \rho_i^2$$
This is because
$$\beta_i = \frac{\text{Cov}[r_i,r_M]}{\text{Var} [r_M]}$$