Q: Prove $f$ is a unit in $A[X]\implies a_0$ is a unit in A and $a_1, . . . , a_n$ are nilpotent.

In a solution it says (https://metaphor.ethz.ch/x/2018/hs/401-3132-00L/ex/sol_1.pdf):

"Assume first that $f$ is a unit in $A[X]$, i.e. there exists g ∈ A[X] such that
fg = 1. Equaling the zero-order coefficients of this two polynomials, we get
that $a_0b_0$ = 1 in A where $g = b_0 + b_1X + ... + b_mX^m$, which means that $a_0$ is invertible in A.
We claim that $a_n^{r+1}b_{m−r} = 0$ for all $0 \leq r \leq m$, and we prove this by
induction on $r$. We already know that $a_nb_m = 0$, since $a_nb_m$ is the higherorder coefficient of the polynomial $fg$. **Now assume that** $a^{r'+1}_nb_{m−r '} = 0$ **for all** $r'<r$. **Then**

$0 = a^r_n(\sum_{i+j=n+m-r}a_ib_j) = a^{r+1}_nb_{m-r}+(\sum_{i+j=n+m-r}a_ia^{n-i}_na^{m-j}_nb_j)$

**where the last sum runs over all pairs** $(i, j)$ **such that** $i+j=n+m-r$ **and** $j>m-r$."

*My question* is how does this equation describe $fg$?
The hightest order polynomial is $a_nb_mx^{m+n}$ and it has to equal 0 for $fg$ to be unit.
The 2 largest polynomials is $(a_{n-1}b_{m} + a_n b_{m-1})x^{n+m-1} + a_nb_mx^{m+n}$ and it has to equal 0, and so on until $a_0b_0=1$

So I try to compare that with the first summation formula: When $r=0$ we get $ 0 = a^{0}_n(a_nb_m) = (1)(a_nb_m)$. That is ok. When $r=1$ there is 2 ways to sum $i+j=m+n-1$ so we get $ 0 = a^{1}_n(a_{n-1}b_m + a_nb_{m-1}) = a_n a_{n-1}b_m + a^{2}_nb_{m-1}$. But this doesnt look anything like the 2 largest polynomials of $fg$ so Im stuck. My question how is $fg$ eqaul the first sum formula?