[Tex/LaTex] Thought bubble in latex

nodes

I wish to draw illustration nodes with text box as shown, But my latex is poor. Any startups?

enter image description here

Best Answer

This is an attempt where tikz pic is used with cloud shape from tikzlibrary. One might to play with cloud puff arc=110, aspect=2 in the cloud/.pic definition for one's like . Furthermore, the node (c1) and (c2) are adjustable to place the two clouds.

Edit: Replace the aspect=2 key by cloud ignores aspect key will yield

enter image description here

enter image description here

Code

\documentclass{article}
\usepackage[left=0in,top=2in]{geometry}
\usepackage{tikz,amsmath}
\usetikzlibrary{arrows,shapes}

\newcommand{\tikzmarkC}[1]{\tikz[overlay,remember picture,baseline={-3pt}] \node[] (#1) {
};}

\tikzset{cloud/.pic={
\node[cloud, cloud puffs=10.8,cloud puff arc=110, aspect=2, draw, text width=3cm
    ] () at (0,0) {\tikzpictext};
}}
\begin{document}

\begin{flalign*}
6x^2+9x-8x-12&=3\tikzmarkC{a}x(2x+3)-\tikzmarkC{b}4(2x+3)\\
&=(3x-4)(2x+3)
\end{flalign*}

\begin{tikzpicture}[overlay,remember picture]
\pic (c1) at (15,5) [pic text=$3x$ is a factor of both $6x^2$and $9x$]{cloud};
\pic (c2) at (17,1) [pic text=$-4$ is a factor of both $-8x$ and $-12$]{cloud};
\draw[-latex'] (c1) to[bend right] (a);
\draw[-latex'] (c2) to[bend left]  (b);

\end{tikzpicture}
\end{document}