I needed help from Marmot on the arrows of this program because my skills are weak, but I made a few attempts alone and got errors I knew were wrong. Removing the package flexisym did the job. Why? It was apart of a larger template so while I don't use it, it was conflicting with the tikzmark package.
\documentclass{article}
\usepackage{amsmath,mathtools,geometry}
\usepackage{flexisym} % Use % to make the program work properly
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\newbox\aebox
\newcommand\aecomment[2][0pt]{%%
\begin{lrbox}\aebox
\begin{minipage}[t]{2.5in}
\raggedright
\textcolor{blue}{#2}%%
\end{minipage}%%
\end{lrbox}%%
\raisebox{#1}[\height][0pt]{\usebox{\aebox}}}
\begin{document}
For $f(x)=\dfrac{1}{x}$, we have
\begin{align*}
f(x+h)&=\dfrac{1}{x+h} \\
\shortintertext{then}\\
f(x+h)-f(x)&=\dfrac{1}{x+h}-\dfrac{1}{x} \\ \\
&=\dfrac{1}{x+h} \cdot \textcolor{red}
{\dfrac{\tikzmarknode{C}{x}}{x}}-\dfrac{1}{x}\cdot \textcolor{red}
{\dfrac{x\tikzmarknode{C'}{+}h}{x+h}} && \aecomment[1.3ex]
{\textcolor{red}{\tikzmarknode{A}
{}Multiplying by $1$ to get a common denominator}}\\
\end{align*}
\begin{tikzpicture}[overlay,remember picture]
\draw[red,-latex] ([yshift=3pt,xshift=-5pt]A.west) -- ++(-7pt,0pt)-- ++
(0pt,12pt) coordinate (aux)-| (C.north);
\draw[red,-latex] (aux) -| (C'.north);
\end{tikzpicture}
\end{document}
This will output with 2 errors the following:
By removing \usepackage{flexisym} the output properly gives:
I don't know what flexisym is but it was incompatible with the tikzmark program!


breqnand both packages are a highly experimental re- implementation of the entire math layout of tex, and are by design incompatible with more or less everything. Anyone using them really needs to be prepared to accept and work round low level tex conflicts. – David Carlisle Nov 22 '18 at 08:02