I am trying to compute the number of solutions of the following system of equations over a finite field $\mathbb{F}_q$ ($q$ may be considered odd prime power or just odd prime if needed): $$ x^m \neq y^m,\\ z^n = w^n = t^n, $$ where all $x$, $y$, $z$, $w$ and $t$ are distinct, $1\le m,n\le q-1$ are two given integers. My idea was to split this into three cases:
1) $x^m \neq z^n$ and $y^m = z^n = w^n = t^n$;
2) $x^m \neq z^n$ and $y^m \neq z^n = w^n = t^n$;
1) $x^m = z^n$ and $y^m \neq z^n = w^n = t^n$.
So, in case 1) we have $y^m = z^n$. The idea is to fix some element $a\in\mathbb{F}_q$ which is simultaneously an $m$-th and an $n$-th power (of possibly two different field elements). The number of such $a$'s is easy to compute. Then we need to count in how many ways, for a fixed $a$, we can choose $y$ and $z$ such that $y^m = a = z^n$. The problem here is that I don't quite understand how to figure out the number of ways in which $x$ may be chosen. So it seems necessary to know the cardinality of the set $\{u\in\mathbb{F}_q\colon u^m = u^n = a \}$.
To compute this latter quantity, assume $g$ is any fixed generator of $\mathbb{F}_q^*$, and write $a = g^i$, $u = g^k$, where the number of possible values of $1\le k\le q-1$ is to be found. Then having $u^m = u^n = a$ is equivalent to the following system of congruences: $$ mk\equiv i\mod q-1,\\ nk\equiv i\mod q-1. $$ One necessary condition for a solution to exist follows immediately: we must have that $lcm((q-1,m),(q-1,n))$ divides $i$. At this point things become increasingly messier. We first divide the two congruences by $(q-1,m)$ and $(q-1,n)$ respectively: $$ m'k\equiv i_1\mod \frac{q-1}{(q-1,m)},\\ n'k\equiv i_2\mod \frac{q-1}{(q-1,n)}, $$ where $m' = \frac{m}{(q-1,m)}$, $n' = \frac{n}{(q-1,n)}$, $i_1 = \frac{i}{(q-1,m)}$, $i_2 = \frac{i}{(q-1,n)}$. As $m'$ and $n'$ are coprime with $\frac{q-1}{(q-1,m)}$ and $\frac{q-1}{(q-1,n)}$, respectively, we can write $$ k \equiv i_1 [m']^{-1}_{\frac{q-1}{(q-1,m)}} \mod \frac{q-1}{(q-1,m)}\\ k \equiv i_2 [n']^{-1}_{\frac{q-1}{(q-1,n)}} \mod \frac{q-1}{(q-1,n)}, $$ where $[x]^{-1}_n$ denotes the inverse modulo $n$ of $x$. A solution of the last system exists if and only if $$ i_1 [m']^{-1}_{\frac{q-1}{(q-1,m)}} \equiv i_2 [n']^{-1}_{\frac{q-1}{(q-1,n)}} \mod (\frac{q-1}{(q-1,m)},\frac{q-1}{(q-1,n)}). $$ It is unique modulo $lcm(\frac{q-1}{(q-1,m)},\frac{q-1}{(q-1,n)})$. So, it is not quite clear how to count the exact number of them.
If anyone knows of any paper where the number of solutions of $x^m = x^n = a$ in a finite field is obtained, please let me know. If anyone sees a quicker more optimal way of counting the number of solutions to the initial problem, please share your thoughts.