We want to prove $\forall n, m :P(n,m)$, where $P(n,m)$ is defined as $(a^n - 1, a^m - 1) = a^{(n,m)} - 1$.
This proof uses a kind of strong induction on $(n,m)$. In other words, it is assumed, outside of base cases, that if $a < n$ and $b < m$, we can assume $P(a,m)$ and $P(n,b)$ in a proof of $P(n,m)$..
Since gcd is symmetric, $P(n,m) \Leftrightarrow P(m,n)$
Base case 1, $m = n$. $(a^m-1, a^n-1) = a^n - 1 = a^{(n,n)} - 1 = a^{(m,n)} - 1$
Base case 2, $m = 0$. $(a^n - 1, a^0 - 1) = (a^n - 1, 0) = a^n - 1 = a^{(n,0)} - 1$.
Base case 3, $n = 0$. same as case 2 by symmetry.
Case 4, $0 < n < m$. Since $y > x \Rightarrow (x,y) = (x, y-x)$, $(a^n - 1, a^m - 1) = (a^n - 1, a^m - a^n) = \left(a^n - 1, a^n(a^{m-n} - 1\right))$ Since $a^n$ and $a^n - 1$ have no factors in common, $(a^n - 1, a^m - 1) = (a^n - 1, a^{m-n} - 1)$.
From induction, $(a^n - 1, a^{m-n} - 1) = a^{(n,m-n)} - 1 = a^{(n,m)} - 1$. So $(a^n - 1, a^m - 1) = a^{(n,m)} - 1$
Case 5, 0 < m < n: Use symmetry and case 4.