How to support draw arrows between parts of an equation

I looking to convert an equation with arrows in different parts using Docx2Latex. But it displays an error
“Code in this LaTeX Block is not good for compiling separately.”

This is the format of the equation
image

Can you share the code for this?

That’s the code:

\documentclass{article}
\usepackage{amsmath}

\usepackage{tikz}
\usetikzlibrary{calc,shapes}


\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}
\newcommand{\DrawBox}[2]{%
  \begin{tikzpicture}[overlay,remember picture]
    \draw[->,shorten >=5pt,shorten <=5pt,out=70,in=130,distance=0.5cm,#1] (MarkA.north) to (MarkC.north);
    \draw[->,shorten >=5pt,shorten <=5pt,out=50,in=140,distance=0.3cm,#2] (MarkA.north) to (MarkB.north);
  \end{tikzpicture}
}
\begin{document}
\begin{equation}
\tikzmark{MarkA}5 (x\tikzmark{MarkB} + 6\tikzmark{MarkC})\DrawBox{red}{blue}
\end{equation}
\end{document}

@zeeshan In the latex block you don’t need to write \begin{document} and other permeable code in LaTeX block. Only write code snippets in latex block.
e.g.

\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}
\newcommand{\DrawBox}[2]{%
  \begin{tikzpicture}[overlay,remember picture]
    \draw[->,shorten >=5pt,shorten <=5pt,out=70,in=130,distance=0.5cm,#1] (MarkA.north) to (MarkC.north);
    \draw[->,shorten >=5pt,shorten <=5pt,out=50,in=140,distance=0.3cm,#2] (MarkA.north) to (MarkB.north);
  \end{tikzpicture}
}

\begin{equation}
\tikzmark{MarkA}5 (x\tikzmark{MarkB} + 6\tikzmark{MarkC})\DrawBox{red}{blue}
\end{equation}

It will not render correctly inside google docs, but it will render perfectly in PDF conversion.