[proofplan]
Write $f$ uniquely as a finite sum of monomials $c_a x^a$ indexed by multi-indices $a$. Replacing each variable $x_i$ by $\lambda x_i$ multiplies the monomial $x^a$ by $\lambda^{|a|}$, so the scaling identity compares the powers $\lambda^{|a|}$ and $\lambda^d$. Coefficient uniqueness in the [polynomial ring](/page/Polynomial%20Ring) $k[\lambda,x_1,\ldots,x_n]$ then says exactly that every nonzero monomial of $f$ has total degree $d$, which is the definition of homogeneity.
[/proofplan]
[step:Expand the polynomial into its monomial support]
Let $\mathbb{Z}_{\ge 0}$ denote the set of nonnegative integers. For a multi-index $a=(a_1,\ldots,a_n) \in \mathbb{Z}_{\ge 0}^n$, define its total degree by
\begin{align*}
|a|=a_1+\cdots+a_n
\end{align*}
and define the corresponding monomial by
\begin{align*}
x^a=x_1^{a_1}\cdots x_n^{a_n}.
\end{align*}
By uniqueness of the monomial expansion in $k[x_1,\ldots,x_n]$, there is a unique finite set $A \subset \mathbb{Z}_{\ge 0}^n$ and unique coefficients $c_a \in k \setminus \{0\}$ for $a \in A$ such that
\begin{align*}
f=\sum_{a \in A} c_a x^a.
\end{align*}
If $f=0$, then $A=\varnothing$. With the stated convention, the zero polynomial is homogeneous of degree $d$ for every $d$, and the identity
\begin{align*}
0=\lambda^d 0
\end{align*}
holds in $k[\lambda,x_1,\ldots,x_n]$. Hence the zero polynomial case is settled, and we may assume $A \neq \varnothing$ when needed.
[/step]
[step:Compute how each monomial scales under $x_i \mapsto \lambda x_i$]
For each $a=(a_1,\ldots,a_n) \in A$, substitution gives
\begin{align*}
(\lambda x)^a=(\lambda x_1)^{a_1}\cdots(\lambda x_n)^{a_n}.
\end{align*}
Using the laws of exponents in the commutative ring $k[\lambda,x_1,\ldots,x_n]$, this becomes
\begin{align*}
(\lambda x)^a=\lambda^{a_1+\cdots+a_n}x_1^{a_1}\cdots x_n^{a_n}.
\end{align*}
Therefore
\begin{align*}
(\lambda x)^a=\lambda^{|a|}x^a.
\end{align*}
Consequently,
\begin{align*}
f(\lambda x_1,\ldots,\lambda x_n)=\sum_{a \in A} c_a \lambda^{|a|}x^a.
\end{align*}
Also,
\begin{align*}
\lambda^d f(x_1,\ldots,x_n)=\sum_{a \in A} c_a \lambda^d x^a.
\end{align*}
[guided]
The point of introducing multi-indices is that every monomial has a single numerical invariant relevant to scaling: its total degree. For $a=(a_1,\ldots,a_n) \in A$, the monomial $x^a$ means
\begin{align*}
x^a=x_1^{a_1}\cdots x_n^{a_n}.
\end{align*}
After replacing $x_i$ by $\lambda x_i$ for every $i$, we obtain
\begin{align*}
(\lambda x)^a=(\lambda x_1)^{a_1}\cdots(\lambda x_n)^{a_n}.
\end{align*}
Because $k[\lambda,x_1,\ldots,x_n]$ is commutative, all powers of $\lambda$ can be collected together. This gives
\begin{align*}
(\lambda x)^a=\lambda^{a_1+\cdots+a_n}x_1^{a_1}\cdots x_n^{a_n}.
\end{align*}
By the definition of total degree, $a_1+\cdots+a_n=|a|$, so
\begin{align*}
(\lambda x)^a=\lambda^{|a|}x^a.
\end{align*}
Applying this computation term-by-term to the finite monomial expansion of $f$ gives
\begin{align*}
f(\lambda x_1,\ldots,\lambda x_n)=\sum_{a \in A} c_a \lambda^{|a|}x^a.
\end{align*}
On the other hand, multiplying the original polynomial by $\lambda^d$ gives
\begin{align*}
\lambda^d f(x_1,\ldots,x_n)=\sum_{a \in A} c_a \lambda^d x^a.
\end{align*}
Thus the scaling identity is exactly a comparison between the exponent $|a|$ naturally produced by each monomial and the fixed exponent $d$ appearing in the statement.
[/guided]
[/step]
[step:Show homogeneous polynomials satisfy the scaling identity]
Assume $f$ is homogeneous of degree $d$. By definition, every monomial of $f$ with nonzero coefficient has total degree $d$, so $|a|=d$ for every $a \in A$. Hence
\begin{align*}
f(\lambda x_1,\ldots,\lambda x_n)=\sum_{a \in A} c_a \lambda^{|a|}x^a.
\end{align*}
Since $|a|=d$ for every $a \in A$, this is
\begin{align*}
f(\lambda x_1,\ldots,\lambda x_n)=\sum_{a \in A} c_a \lambda^d x^a.
\end{align*}
Factoring out $\lambda^d$ in $k[\lambda,x_1,\ldots,x_n]$ gives
\begin{align*}
f(\lambda x_1,\ldots,\lambda x_n)=\lambda^d \sum_{a \in A} c_a x^a.
\end{align*}
Since $\sum_{a \in A} c_a x^a=f(x_1,\ldots,x_n)$, we obtain
\begin{align*}
f(\lambda x_1,\ldots,\lambda x_n)=\lambda^d f(x_1,\ldots,x_n).
\end{align*}
[/step]
[step:Compare coefficients to recover homogeneity from the scaling identity]
Conversely, assume
\begin{align*}
f(\lambda x_1,\ldots,\lambda x_n)=\lambda^d f(x_1,\ldots,x_n)
\end{align*}
in $k[\lambda,x_1,\ldots,x_n]$. Using the expansions already computed, this says
\begin{align*}
\sum_{a \in A} c_a \lambda^{|a|}x^a=\sum_{a \in A} c_a \lambda^d x^a.
\end{align*}
Fix $a \in A$. The monomial $\lambda^{|a|}x^a$ has coefficient $c_a$ on the left-hand side. If $|a| \neq d$, then the same monomial has coefficient $0$ on the right-hand side, because the right-hand side contains the monomial $\lambda^d x^a$ rather than $\lambda^{|a|}x^a$. By uniqueness of coefficients in the polynomial ring $k[\lambda,x_1,\ldots,x_n]$, we must have $c_a=0$. This contradicts the definition of $A$, where each $c_a$ is nonzero. Therefore $|a|=d$ for every $a \in A$.
Thus every monomial of $f$ with nonzero coefficient has total degree $d$. By the definition of a [homogeneous polynomial](/page/Homogeneous%20Polynomial) of degree $d$, $f$ is homogeneous of degree $d$.
[/step]