This is MWE for problems - solutions environment, that is combining @Sebastiano code and @CarLaTeX code from Math book: how to write Exercise and Answers
\documentclass[11pt]{book}
\usepackage[most]{tcolorbox}
\usepackage{lipsum}
\usepackage{multicol}
\usepackage{ifthen}
\usepackage{xcolor}
\colorlet{lightcyan}{cyan!40!white}
\usepackage{chngcntr}
\usepackage{stackengine}
\usepackage{tasks}
\newboolean{firstanswerofthechapter}
\colorlet{lightcyan}{cyan!40!white}
\newtcolorbox[auto counter]{problem}[2][]{%
breakable,
blankest,
enhanced,
attach boxed title to top left={yshift=-\tcboxedtitleheight},
left=\tcboxedtitlewidth+2mm,
top=0pt,
colback=white,
fonttitle=\bfseries\sffamily,
coltitle={cyan!60!black},
colbacktitle=white,
colframe=white,
title=\thetcbcounter,
overlay unbroken and first={%
\node[fill=gray!30, inner sep=1pt,
minimum width=\tcboxedtitlewidth,
outer sep=0pt,
anchor=north] at (title.south) {%
\foreach \i in {1,...,4}{%
\ifnum\i>#2%
\,\textcolor{cyan!60!black}{$\bullet$}%
\else
\,\textcolor{red}{$\bullet$}%
\fi}};},
#1}
\newtcolorbox{exsolution}[2]{%
breakable,
blankest,
enhanced,
attach boxed title to top left={yshift=-\tcboxedtitleheight},
left=\tcboxedtitlewidth+2mm,
top=0pt,
colback=white,
fonttitle=\bfseries\sffamily,
coltitle={cyan!60!black},
colbacktitle=white,
colframe=white,
title=#1,
overlay unbroken and first={%
\node[fill=gray!30, inner sep=1pt,
minimum width=\tcboxedtitlewidth,
outer sep=0pt,
anchor=north] at (title.south) {%
\foreach \i in {1,...,4}{%
\ifnum\i>#2%
\,\textcolor{cyan!60!black}{$\bullet$}%
\else
\,\textcolor{red}{$\bullet$}%
\fi}};},
overlay unbroken and first={%
\node[fill=gray!30, inner sep=1pt,
minimum width=\tcboxedtitlewidth,
outer sep=0pt,
anchor=north] at (title.south) {%
\foreach \i in {1,...,4}{%
\ifnum\i>#2%
\,\textcolor{cyan!60!black}{$\bullet$}%
\else
\,\textcolor{red}{$\bullet$}%
\fi}};}, }
\newlength{\longestlabel}
\settowidth{\longestlabel}{\bfseries viii.}
\settasks{counter-format={tsk[r].}, label-format={\bfseries}, label-width=\longestlabel,
item-indent=0pt, label-offset=2pt, column-sep={10pt}}
\usepackage[lastexercise,answerdelayed]{exercise}
\renewcommand{\ExerciseName}{EXERCISES}
\renewcommand{\ExerciseHeader}{}
\renewcommand{\AnswerName}{Problems}
\renewcommand{\AnswerHeader}{\ifthenelse{\boolean{firstanswerofthechapter}}%
{\bigskip\noindent\textcolor{cyan}{\textbf{CHAPTER \thechapter}}\newline\newline%
\noindent\bfseries\emph{\textcolor{cyan}{\AnswerName\ {\thesection}, page %
\pageref{\AnswerRef}}}\smallskip}
{\noindent\bfseries\emph{\textcolor{cyan}{\AnswerName\ {\thesection} page \pageref{\AnswerRef}}}\smallskip}}
\setlength{\QuestionIndent}{16pt}
\begin{document}
\chapter{Test 1}
\lipsum[1]
\section{Problems}
\begin{Exercise}\label{EX-1.1}
\begin{problem}{1}
\lipsum[2]
\end{problem}
\end{Exercise}
\chapter{Test 2}
\lipsum[1]
\section{Problems}
\begin{Exercise}\label{EX-2.1}
\begin{problem}{4}
\lipsum[3]
\end{problem}
\begin{problem}{2}
\lipsum[4]
\end{problem}
\end{Exercise}
\setboolean{firstanswerofthechapter}{true}
\begin{Answer}[ref={EX-2.1}]
\begin{exsolution}{3}{2}
\lipsum[2]
\end{exsolution}
\end{Answer}
\chapter{Solutions}
\shipoutAnswer
\end{document}
However, as one can see, this is pretty clumsy solution. In my opinion it would be the most practical to have unified environment for problem and corresponding solution immediately after. Something like
\begin{prob}
\lipsum[2]
\begin{solution}
.....
\end{solution}
\end{prob}
so, this solution (if exists) is sent automatically to chapter with solutions of exercises. Unfortunately, I don't have enough LaTeX experience and knowledge to do it.