My attempt:
by Wilson's theorem, $(p-1)!=p⋅A-1$. Let $(p-2) !=p \cdot B+r$, where $0 \leq r<p$. Multiply the last equality by $(p-1)$:
$$(p-1) !=p \cdot B \cdot(p-1)+p \cdot r-r=p \cdot(B \cdot(p-1)+r)-r.$$
Comparing with the first equality, we get that $r=1$.
But my textbook says that $p-1$... Am I wrong?
A more general way to solve it is to use CRT - see the linked dupe.
– Bill Dubuque Dec 06 '21 at 00:29