How can I note transformation step?

Typically these things are set as comments (on the right) of the actual structure:

enter image description here

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{align}
    0 &\stackrel{!}{=} (d_{P,f}^2)'\\
      &= -2 x_p + 2x -2y_p f'(x) + \bigl(f(x)^2 \bigr)'\\
      &= -2 x_p + 2x -2y_p f'(x) + 2 f(x) \cdot f'(x) \rlap{\hspace*{2em}(Chain rule)} \\
      &= -2 x_p + 2x -2y_p (2ax+b) + ((ax^2+bx+c)^2)'
\end{align}
\end{document}

The fact that the comment is set in \rlap automatically turns it into text mode, but also does not affect the horizontal placement of the entire structure


A combination of \substack -- a macro provided by the amsmath package -- and \mathclap (provided by the mathtools package) may be able to deliver what you want:

enter image description here

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{align}
0 &\stackrel{!}{=} (d_{P,f}^2)'\\
  &= -2 x_p + 2x -2y_p f'(x) + \bigl(f(x)^2 \bigr)'\\
  &\stackrel{\mathclap{\substack{\text{Chain}\\\text{Rule}}}}{=} 
     -2 x_p + 2x -2y_p f'(x) + 2 f(x) \cdot f'(x) \\
  &= -2 x_p + 2x -2y_p (2ax+b) + ((ax^2+bx+c)^2)'
\end{align}
\end{document}

If you intention was making Chain rule as narrow as possible...

\documentclass{article} 
\usepackage{amsmath}
\usepackage{mathtools}

\begin{document}


\begin{align}
    0     &\stackrel{!}{=} (d_{P,f}^2)'\\
          &= -2 x_p + 2x -2y_p f'(x) + \left (f(x)^2 \right )'\\
          &\overset{\mathclap{\begin{array}{c}\mbox{\tiny Chain}\\[-6pt] \mbox{\tiny rule}\end{array}}}{=} -2 x_p + 2x -2y_p f'(x) + 2 f(x) \cdot f'(x)\\
          &= -2 x_p + 2x -2y_p (2ax+b) + ((ax^2+bx+c)^2)'
\end{align}

\end{document}

enter image description here

Of course, one can correct also vertical spacing between 2nd and 3rd line, but I am not sure if this your wish.