Number theory contradiction I was solving this question

How many pairs of integers $(a,b)$ that satisfies the following conditions:

*

*$1\le a,b\le 42$


*$a^9\equiv b^7\pmod{43}$

and I ran into a contradiction:
We know by Fermat's Little Theorem that $a^{42} \equiv 1 \pmod{43}$ and $b^{42} \equiv 1 \pmod{43}$. Thus, we make the given condition in the problem equivalent to $a^{54} \equiv b^{42} \equiv 1 \pmod{43}$. Then, $a^{12} \equiv 1 \pmod{43}$.
I don't see the problem in my reasoning here. We have $a^{54} \equiv 1 \pmod{43}$ is equivalent to saying $a^9\equiv b^7\pmod{43}$ since $43$ is prime, but $6^{54} \equiv 1 \pmod{43}$ while $6^9 \equiv 1 \pmod{43}$ and $6^9 \equiv b^7 \pmod{43}$ isn't true for all $b$ as $a^{54} \equiv 1 \pmod{43}$ suggests. So how is it not equivalent?

3 is a cyclical generator for $Z_{43}$
Every number in between 1 and 42 can be expressed as $3^n$
$a= 3^n, b = 3^m\\
a^9 \equiv 3^{9n} \mod 43\\
b^7 \equiv 3^{7m} \mod 43$
the only numbers that overlap are $3^{21} \equiv 42$ and $3^{42} \equiv 1.$
$a^9\equiv b^7\equiv 1 \mod 43$
$a = 1, 4, 16,21, 41,35, 11,$ and $b = 1,6,36.$ or
$a^9\equiv b^7\equiv 42 \mod 43$
$a = 42, 39, 27,22, 2,8, 32,$ and $b = 42, 37,7.$ 
