Lagrange's Theorem: If $p$ is a prime and $$f(x)=a_nx^n+a_{n-1}^{n-1}+....+a_0, \text{ where }a_n\not\equiv 0\pmod p.$$ is a polynomial of degree $n\geq 1$ with integral coefficients, then the congruence $$f(x)\equiv 0\pmod p$$ has at most $n$ incongruent solutions.
Corollary: If $p$ is a prime and $d|p-1$, then the congruence $$x^d-1\equiv 0\pmod p$$ has exatcly $d$ solutions.
I am facing some difficulty in understanding the proof outlined in the book Elementary Number Theory by David M. Burton.
Since $d|p-1$ we have $x^{p-1}-1=(x^d-1)f(x)$, where the degree of $f(x)$ is $p-1-d.$ We know that $x^{p-1}-1\equiv 0\pmod p$ has exactly $p-1$ incongruent solutions modulo $p$, the solutions being $1,2,3,...,p-1.$ Now any solution $x=a$ of $x^{p-1}-1\equiv 0\pmod p$ which is not a solution of $f(x)$ must be a solution of $x^d-1\equiv 0\pmod p.$ Since $f(x)\equiv 0\pmod p$ has atmost $p-1-d$ (Due to Lagrange's Theorem) and $x^{p-1}-1\equiv 0\pmod p$ has $p-1$ solutions, this implies that the equation $x^d-1\equiv 0\pmod p$ has at least $$p-1-(p-1-d)=d$$ solutions and since the maximum possible number of solutions is $d$ (Lagrange's Theorem) we conclude that $x^d-1\equiv 0\pmod p$ has exactly $d$ solutions.
I don't understand the part in bold. Please explain. (Using elementary knowledge of Number Theory)