Here is the theorem I working on:
Let $f(X), g(X) \in k[X] = k[x_1,...,x_n]$, where $k$ is an infinite field.
(i) If $f(X)$ is nonzero, then there are $a_1,...,a_n \in k$ with $f(a_1,..,a_n) \neq 0$.
(ii) If $f(a_1,...,a_n) = g(a_1,...,a_n)$ for all $(a_1,...,a_n) \in k^n$, then $f(X)=g(X)$.
I already proved part (i), and I thought that proving part (ii) would involve a simple application of (i) like so:
Let $h(X) := f(X) - g(X)$. Then clearly $h(a_1,...,a_n) = 0$ for every $(a_1,...a_n) \in k^n$, and therefore $h(X)= 0(X) = 0$ or $f(X) = g(X)$.
But, as the picture shows, the author does something a bit more complicated. Is there anything wrong with the proof I gave?