The following code provides this result:
I would like to get a small "{" fitting the text and not the upper and down box.
Any idea?
\documentclass[preview]{standalone}
\usepackage{mathtools}
\usepackage{tikz}
\setlength{\textwidth}{15cm}
\makeatletter
\define@key{janbertdims}{align}{\def\janbert@align{\hspace{#1}}}
\define@key{janbertdims}{arrow}{\def\janbert@arrow{#1}}
\define@key{janbertdims}{color}{\def\janbert@color{#1}}
\setkeys{janbertdims}{
align=0cm,
arrow=\bigg\downarrow,
color=orange,
}
\newcommand\underbox[3][]{%
\begingroup
\setkeys{janbertdims}{#1}% the current values
\underset{\mathclap{\substack{\janbert@arrow \[0.1cm]
\tikz\node[draw=\janbert@color, align=center, rounded corners]{#2}; \janbert@align }}}{#3}
\endgroup
}
\newcommand\overbox[3][]{%
\begingroup
\setkeys{janbertdims}{#1}% the current values
\overset{\mathclap{\substack{\tikz\node[draw=\janbert@color, align=center, rounded corners]{#2};
\janbert@align \[0.1cm] \janbert@arrow
}}}{#3}
\endgroup
}
\makeatother
\begin{document}
$$
a_{n+2}=b_n a_n \underbox[align=2cm]{ $a_n=b_{n-2}a_{n-2}$}{=}
b_n b_{n-2} a_{n-2}\underbox[align=0.6cm,arrow={\Bigg\downarrow}]{$a_{n-2}=b_{n-4}a_{n-4}$}{=}
\dots
\overbox[align=4.25cm]{this process concludes when \[0.1cm] $n-2k$ is $0$ ou $1$}{=}
\begin{cases}
b_n b_{n-2}\dots b_{2} b_0 a_0
\overbox{$a_0=0$}{=}0 & \text{if $n=2k$} \
b_n b_{n-2} \dots b_3b_1 a_1
\underbox{$a_1=1$ }{=} b_n b_{n-2} \dots b_3b_1 & \text{if $n=2k+1$}
\end{cases}
$$
\end{document}

