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=\left(\displaystyle\frac{1\left(1+1\right)}{2}\right)^2.$$
$\textbf{2.}$ Suppose the formula holds for $n=k$, that is, suppose that
$$1^3+2^3+\ldots+k^3=\left(\displaystyle\frac{k\left(k+1\right)}{2}\right)^2.$$
Then, by adding $\left(k+1\right)^3$ to both sides of the previous equation we obtain that
$$1^3+2^3+\ldots+k^3+\left(k+1\right)^3=\left(\displaystyle\frac{k\left(k+1\right)}{2}\right)^2+\left(k+1\right)^3$$
Now, observe that
$$\left(\displaystyle\frac{k\left(k+1\right)}{2}\right)^2+\left(k+1\right)^3=$$
$$\displaystyle\frac{k^2\left(k+1\right)^2}{4}+\left(k+1\right)^2\left(k+1\right)=$$
$$\displaystyle\frac{k^2}{4}\left(k+1\right)^2+\left(k+1\right)^2\left(k+1\right)=$$
$$\left(\displaystyle\frac{k^2}{4}+k+1\right)\left(k+1\right)^2=$$
$$\left(\displaystyle\frac{k^2+4k+4}{4}\right)\left(k+1\right)^2=$$
$$\left(\displaystyle\frac{\left(k+2\right)^2}{4}\right)\left(k+1\right)^2=$$
$$\left(\displaystyle\frac{\left(k+1\right)^2\left(k+2\right)^2}{4}\right)=$$
$$\left(\displaystyle\frac{\left(k+1\right)\left(k+2\right)}{2}\right)^2=$$
$$\left(\displaystyle\frac{\left(k+1\right)\left(\left(k+1\right)+1\right)}{2}\right)^2.$$
Thus,
$$1^3+2^3+\ldots+k^3+\left(k+1\right)^3=\left(\displaystyle\frac{\left(k+1\right)\left(\left(k+1\right)+1\right)}{2}\right)^2$$
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$.