This question is about the logic of a proof, not the number theory involved.
Exercise (4.1).9 of Number Theory Step by Step (Singh) is:
Find a solution of $x^{101} ≡ 5 \pmod {13}$.
The chapter introduces Fermat's Little Theorem, that if $p$ is prime and does not divide integer $a$, then $a^{p-1} \equiv 1 \pmod p$. The book says it like this (link).
The following is my solution (which matches the author's official solution too):
My Solution
If we assume [see Question below] the prime 13 does not divide $x$, then we have
$x^{12} \equiv 1 \pmod {13}$
$(x^{12})^{8} \equiv x^{96} \equiv 1 \pmod {13}$
And so
$x^{101} \equiv x^{96} \times x^{5} \equiv x^5 \equiv 5 \pmod {13}$
The following table shows some $x^5 \pmod{13}$.
x x^5 x^5 mod 13
0 0 0
1 1 1
2 32 6
3 243 9
4 1024 10
5 3125 5 <--- solution
6 7776 2
We can see $x=5$ is a solution, and our assumption 13 does not divide $x=5$ holds.
Question
I am uncertain about assuming 13 does not divide $x$ at the start of the solution, in order to use Fermat's Little Theorem.
Typically, to use Fermat's Little Theorem, or any theorem, I have to show the preconditions hold first.
Here a solution emerges as $x=5$ which we confirm meets the theorem's preconditions, after we have found it.
The author's own solution (link to image) appears to ignore the theorem's requirement that prime $p$ must not divide $a$.
What am I missing?