<s>[INST] How does Tom Apostol deduce the inequality $\frac{k^3}{3} + k^2 \lt \frac{(k + 1)^3}{3}$ in section I 1.3 of his proof by induction example? In his book Calculus, Vol. 1, Tom Apostol writes the following proof for proving the following predicate by induction:
$$A(n): 1^2 + 2^2 + \cdots + (n - 1)^2 \lt \frac{n^3}{3}.$$
I have omitted the Base Case due to lack of specific relevance. An excerpt from the book's page:

Assume the assertion has been proved for a specific value of $n$, say $n = k$. That is, assume we have proved
$$A(k): 1^2 + 2^2 + \cdots + (k - 1)^2 \lt \frac{k^3}{3}$$
for a fixed $k \ge 1$. Now using this, we shall deduce the corresponding result for $k + 1:$
$$A(k + 1): 1^2 + 2^2 + \cdots + k^2 \lt \frac{(k + 1)^3}{3}.$$
Start with $A(k)$ and add $k^2$ to both sides. This gives the inequality
$$1^2 + 2^2 + \cdots + k^2 \lt \frac{k^3}{3} + k^2.$$
To obtain $A(k + 1)$ as a consequence of this, it suffices to show that
$$\frac{k^3}{3} + k^2 \lt \frac{(k + 1)^3}{3}.$$
But this follows at once from the equation
$$\frac{(k + 1)^3}{3} = \frac{k^2 + 3k^2 + 3k + 1}{3} = \frac{k^3}{3} + k^2 + k + \frac13.$$
Therefore, we have shown that $A(k + 1)$ directly follows from $A(k)$.

I can not understand the last two steps. Why do the expressions seem to flip on the inequality in step 4 such that $\frac{k^3}{3} + k^2$ is now on the other side of the less than symbol, and how does the final equation prove the assertion?
Thank you.
 [/INST] If $a<b, b<c; a<c$
So, as $1^2 + 2^2 + \cdots + k^2 \lt \dfrac{k^3}3+k^2,$
and if we can show $\dfrac{k^3}3+k^2<\dfrac{(k+1)^3}3$
we can safely conclude,
 $$1^2 + 2^2 + \cdots + k^2 \lt\dfrac{(k+1)^3}3$$
</s>