решение1
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\begin{document}
\[
(a,b,c^2) = (a,\underbrace{b,c^2)(a,b}_{\text{some text}},c^2)
\]
\begin{align*}
(a,b,c^2) &\in (a,b,c^2) & \quad & (\text{by distribution law})\\
(a,b,c^2) &= a^2 b & \quad & (\text{by .. law})
\end{align*}
\end{document}