How to Prove $a \equiv a^{-1} \pmod b$
$a^2 \equiv 1\pmod b$
$(b-1)^2\equiv 1 \pmod b$
$b^2 -2b + 1 \equiv 1\pmod b$
$b(b-2) + 1 \equiv 1\pmod b$
$1 \equiv 1\pmod b$
So you have proven that $a = b-1$ and $a\equiv a^{-1}\pmod b$ then $1\equiv 1 \pmod b$.
Which is NOT what you were asked to prove.
You can NOT do a proof by assuming what you need to prove and ending up with a true statement. All that proves is that maybe $1\equiv 1\pmod b$ but only if we already know for a fact that $a\equiv a^{-1} \pmod b$.
This in no way shows us that $a\equiv a^{-1} \pmod b$. It just shows you don't always get a contradiction.
We start with what we know
$a = b-1$ then we want to show if we multiply by $a$ we will get a congruence to $1$.
$a = b-1$ so
$a\cdot a = (b-1)(b-1)=b^2 -2b + 1=b(b-2) + 1$ so
$a\cdot a \equiv 1 \pmod b$. We didn't assume it. We showed it.
So $a \equiv a^{-1} \pmod b$.
.....
It may be even easier to note that if $a = b-1$ then $a \equiv -1\pmod b$. So $a^2 \equiv (-1)^2 \equiv 1 \pmod b$. So $a\equiv a^{-1}\pmod b$.
.....
But PLEASE tattoo it to your forehead that you do not ever start a proof by assuming what you need to prove.
$$a \equiv b - 1 \equiv -1 \ (mod \ b) $$ because $b \equiv 0 \ (mod \ b)$, so $$a^2 \equiv (-1)^2 \equiv 1 \ (mod \ b)$$ $$a\cdot a \equiv a \cdot a^{-1} \equiv 1 \ (mod \ b) \longrightarrow b\ | \ a(a - a^{-1}) $$ But $mdc(a, b) = mdc(b -1, b) = 1$, so $b\ | \ (a - a^{-1}) \longrightarrow a \equiv a^{-1} \ (mod \ b)$