Step 1: Begin by calculating the determinants of the two matrices. The determinant of a \(2 \times 2\) matrix
\[
\begin{pmatrix} a & b \\ c & d \end{pmatrix}
\]
is given by:
\[
\text{Determinant} = ad - bc.
\]
For the first matrix
\[
\begin{pmatrix} 2017 & 2018 \\ 2019 & 2020 \end{pmatrix},
\]
the determinant is:
\[
\left| \begin{pmatrix} 2017 & 2018 \\ 2019 & 2020 \end{pmatrix} \right| = (2017)(2020) - (2018)(2019).
\]
Simplifying:
\[
2017 \times 2020 = 4064340, \quad 2018 \times 2019 = 4064342,
\]
so the determinant is:
\[
4064340 - 4064342 = -2.
\]
For the second matrix
\[
\begin{pmatrix} 2021 & 2022 \\ 2023 & 2024 \end{pmatrix},
\]
the determinant is:
\[
\left| \begin{pmatrix} 2021 & 2022 \\ 2023 & 2024 \end{pmatrix} \right| = (2021)(2024) - (2022)(2023).
\]
Simplifying:
\[
2021 \times 2024 = 4084644, \quad 2022 \times 2023 = 4084646,
\]
so the determinant is:
\[
4084644 - 4084646 = -2.
\]
Step 2: Now, we add the two determinants:
\[
-2 + (-2) = -4.
\]
Step 3: According to the given equation
\[
\left| \begin{pmatrix} 2017 & 2018 \\ 2019 & 2020 \end{pmatrix} \right| + \left| \begin{pmatrix} 2021 & 2022 \\ 2023 & 2024 \end{pmatrix} \right| = 2k,
\]
we have:
\[
-4 = 2k \quad \Rightarrow \quad k = -2.
\]
Step 4: Finally, we calculate \( k^3 \):
\[
k^3 = (-2)^3 = -8.
\]