\definecolor{ffqqqq}{rgb}{1,0,0}
\definecolor{qqwuqq}{rgb}{0,0.39215686274509803,0}
\definecolor{qqzzff}{rgb}{0,0.6,1}
\begin{center}
\begin{tikzpicture}
\begin{axis}[
axis lines=middle,
ymajorgrids=true,
xmajorgrids=true,
xmin=-2,
xmax=2,
ymin=-1,
ymax=3,
xtick={-2,-1,...,2},
ytick={-1,0,...,3},]
\clip(-2,-1) rectangle (2,3);
\draw[line width=1pt,color=qqwuqq,smooth,samples=100,domain=-2:2] plot(\x,{(\x + 1) * exp(\x)});
\draw [fill=ffqqqq] (0,1) circle (2pt);
\draw[color=ffqqqq] (0.2,1.2) node[right] {$A$};
\draw [fill=qqzzff] (-1,0) circle (2pt);
\draw[color=qqzzff] (-1.2,0) node[above] {$B$};
\draw[line width=1pt,color=ffqqqq] plot[smooth,domain=-0.5:0.5] (\x,{1 + 2*\x});
\draw[color=ffqqqq] (-0.5,0) node[below] {$-\tfrac{1}{2}$};
\end{axis}
\end{tikzpicture}
\end{center}