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.
 A: $A(k)$ states
$$1^2 + \cdots + (k-1)^2 < \frac{k^3}{3}.$$
Adding $k^2$ to both sides yields
$$1^2 + \cdots + k^2 < \frac{k^3}{3} + k^2.$$
If we prove $\frac{k^3}{3} + k^2 < \frac{(k+1)^3}{3}$
then we can tack this onto the end of the above inequality to get
$$1^2 + \cdots + k^2 < \frac{k^3}{3} + k^2 < \frac{(k+1)^3}{3}$$
which is the desired inequality $A(k+1)$.
It remains to verify the unjustified claim $\frac{k^3}{3} + k^2 < \frac{(k+1)^3}{3}$.
The final equation $\frac{(k+1)^3}{3} = \frac{k^3}{3} + k^2 + k + \frac{1}{3}$ in your post is just obtained by expanding $(k+1)^3$. The right-hand side is greater than $\frac{k^3}{3} + k^2$ since $k+1$ is positive.
A: 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$$
A: you are given:
$$ 1^2 + 2^2 + ... + (k-1)^2 < \frac{k^3}{3} $$
by induction hypothesis. Now, what he is doing is
$$ 1^2 + 2^2 + ... + (k-1)^2 {\color{red} + } \color{red}{k^2}  < \frac{k^3}{3} {\color{red} + } \color{red}{k^2} $$
Now, you want to prove that
$$ 1^2 + 2^2 + ... + (k-1)^2 + k^2 < \frac{(k+1)^3}{3} $$
But,
by the second line, you might as well just prove that
$$ \frac{k^3}{3} {\color{red} + } \color{red}{k^2} < \frac{ (k+1)^3}{3} $$
also, obviously,
$$ k + \frac{1}{3} > 0 $$
A: There's possibly a better way to see what's going on; instead of manipulating what you want to show, proceed from the left-hand side:
\begin{align}
1^2+2^2+\dots+(k-1)^2+k^2
&<\frac{k^3}{3}+k^2 && \text{(induction hypothesis)}\\[4px]
&=\frac{1}{3}(k^3+3k^2) && \text{(because we want $1/3$)}\\[4px]
&=\frac{1}{3}(k^3+3k^2+3k+1-3k-1) && \text{(complete the cube)}\\[4px]
&=\frac{1}{3}(k+1)^3-\frac{1}{3}(3k+1) && \text{(separate the cube)}\\[4px]
&<\frac{1}{3}(k+1)^3
\end{align}
