Showing that $2^{N-1}\equiv1\pmod N$ when $N=2^p-1$ for prime $p$
a) $2^p \equiv 1 \mod N$ because $2^p = N + 1$. When you reduce $\mod N$ (take the remainder when dividing by $N$),  you are left with 1.

b) $N - 1 = 2^p - 2$

By Fermat's little theorem, $2^p \equiv 2 \mod p$:

$2^p - 2 \equiv 2 - 2 \equiv 0 \mod p$

c)

From a) we know that $2^p \equiv 1 \mod N$

From b) we know that $N - 1 \equiv 0\mod p$, therefore $N-1$ is a multiple of $p$.

Let $N-1 = kp$ for some integer $k$

$2^{N-1} = 2^{kp}$

$(2^p)^{k} \equiv 1^k \equiv 1 \mod N$