# Writing text below the equations and side by side

I am currently writing some proofs of the theorem. I need to write the text as given below:

\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}


• I'm not sure what you mean by write inside [....], please elaborate. – AboAmmar Feb 16 '18 at 15:36