\documentclass{article}
\usepackage{amsmath}
\title{Aligned mathematics}
\author{VK}
\date{\today}
\begin{document}
\maketitle
\begin{align}
(x+h)^2-x^2 & = x^2+2xh+h^2-x^2 &&\text{(by distributivity)}\nonumber\\
& = 2xh+h^2 &&\text{(by subtraction)}\\
& = h(2x+h)
\end{align}
\end{document}