Answer
See the proof below.
Work Step by Step
In order to show that the formula holds we must show that it is true for $n=1$ and that if its is true for $n=k$ then, it is true for $n=k+1$.
$\textbf{1.}$ The formula holds for $n=1$ since
$$1=\displaystyle\frac{1\left(1+\displaystyle\frac{1}{2}\right)\left(1+1\right)}{3}.$$
$\textbf{2.}$ Suppose the formula holds for $n=k$, that is, suppose that
$$1^2+2^2+\ldots+k^2=\displaystyle\frac{k\left(k+\displaystyle\frac{1}{2}\right)\left(k+1\right)}{3}.$$
Then, by adding $\left(k+1\right)^2$ to both sides of the previous equation we obtain that
$$1^2+2^2+\ldots+k^2+\left(k+1\right)^2=\displaystyle\frac{k\left(k+\displaystyle\frac{1}{2}\right)\left(k+1\right)}{3}+\left(k+1\right)^2.$$
Now, observe that
$$\displaystyle\frac{k\left(k+\displaystyle\frac{1}{2}\right)\left(k+1\right)}{3}+\left(k+1\right)^2=$$
$$\displaystyle\frac{k\left(k+\displaystyle\frac{1}{2}\right)}{3}\left(k+1\right)+\left(k+1\right)\left(k+1\right)=$$
$$\left[\displaystyle\frac{k\left(k+\displaystyle\frac{1}{2}\right)}{3}+\left(k+1\right)\right]\left(k+1\right)=$$
$$\left[\displaystyle\frac{k\left(k+\displaystyle\frac{1}{2}\right)+\left(3k+3\right)}{3}\right]\left(k+1\right)=$$
$$\left[\displaystyle\frac{k^2+\displaystyle\frac{k}{2}+3k+3}{3}\right]\left(k+1\right)=\left[\displaystyle\frac{k^2+\displaystyle\frac{7k}{2}+3}{3}\right]\left(k+1\right)=$$
$$\left[\displaystyle\frac{\left(k+\displaystyle\frac{3}{2}\right)\left(k+2\right)}{3}\right]\left(k+1\right)=\displaystyle\frac{\left(k+1\right)\left(k+\displaystyle\frac{3}{2}\right)\left(k+2\right)}{3}=$$
$$\displaystyle\frac{\left(k+1\right)\left(\left(k+1\right)+\displaystyle\frac{1}{2}\right)\left(\left(k+1\right)+1\right)}{3}.$$
Thus,
$$1^2+2^2+\ldots+k^2+\left(k+1\right)^2=\displaystyle\frac{\left(k+1\right)\left(\left(k+1\right)+\displaystyle\frac{1}{2}\right)\left(\left(k+1\right)+1\right)}{3}$$
and therefore, the formula holds for $n=k+1$ whenever it is true for $n=k$.
Hence, the mathematical induction principle guarantees that the formula is true for every positive integer $n$.