Answer
$\frac{1}{3}n\left(n^2+6n+17\right)$
Work Step by Step
First, we will use the fact that the sum passes through terms individually, as well as the fact that the constant can be put in front of the sum:
$$A=\sum_{i=1}^n(i^2+3i+4)=\sum_{i=1}^ni^2+3\sum_{i=1}^ni+\sum_{i=1}^n4.$$
Now, using equalities from Theorem 3 we get
$$A=\frac{n(n+1)(2n+
1)}{6}+3\frac{n(n+1)}{2}+4n=\\
n\left(\frac{(n+1)(2n+1)}{6}+\frac{3(n+1)}{2}+4\right)=n\left((n+1)\left(\frac{2n+1}{6}+\frac{3}{2}\right)+4\right)=n\left((n+1)\left(\frac{2n+1}{6}+\frac{3}{2}\right)+4\right)=n\left((n+1)\frac{2n+1+9}{6}+4\right)=n\left(\frac{(n+1)(n+5)}{3}+4\right)=\frac{1}{3}n\left(n^2+6n+17\right).$$