Answer
$a^3+1$
Work Step by Step
Using $a(b+c)=ab+ac$ or the Distributive Property, the given expression, $
(a+1)(a^2-a+1)
$, is equivalent to
\begin{array}{l}\require{cancel}
a(a^2)+a(-a)+a(1)+1(a^2)+1(-a)+1(1)
\\\\=
a^3-a^2+a+a^2-a+1
\\\\=
a^3+(-a^2+a^2)+(a-a)+1
\\\\=
a^3+0a^2+0a+1
\\\\=
a^3+1
.\end{array}