For example, if $5 x, y$ are prime numbers, solve the equation $x^{y}-y^{x}=x y^{2}-19$.
(2004 Balkan Mathematical Olympiad)
Analysis We need to make full use of the condition that $x, y$ are prime numbers.
Solution If $x=y$, then $x y^{2}=19$ has no integer solution;
If $x \neq y$, then $y^{x}-x^{y}+x y^{2}=19$. Since $x, y$ are prime numbers, by Fermat's Little Theorem
$$
x^{y} \equiv x(\bmod y) \text {, so } y^{x}-x^{y}+x y^{2} \equiv-x(\bmod y) \text {. }
$$

That is, $-x \equiv 19(\bmod y)$, so $y \mid 19+x$.
Again by Fermat's Little Theorem $y^{x} \equiv y(\bmod x)$, so $y^{x}-x^{y}+x y^{2} \equiv y(\bmod x)$. That is, $y \equiv 19(\bmod x)$.
1) If $y>19$ then
$$
x \mid y-19 \text {. }
$$
ii) From (1) we know: $y \leqslant 19+x$; From (2) we know: $x \leqslant y-19$ i.e., $y \geqslant x+19$, so $y=x+19$.

And $y$ is a prime number. When $x$ is an odd prime, $y$ is an even number; when $x=2$, $y=21$; both contradict that $y$ is a prime number. So there is no solution in this case.
iii) If $y=19$, from $y \mid 19+x$ we know $y \mid x$, so $y=x$, no solution.
iv) If $y<19$, then when $y=17$:
$$
17^{x}-x^{17}+x \cdot 17^{2}=19 .
$$

It is easy to see: $x \geqslant 17$ implies $17^{x}-x^{17} \geqslant 0$, no solution, so $x \leqslant 13$.
When $x=13,11,7,5,3$, both sides modulo 4, no solution; $x=2$ makes the left side less than 0, no solution;
When $y=13$: both sides modulo 4, $x=11,7,5$ no solution; $x=2$ makes the left side less than 0.
When $y=11$: similarly $x=7,5,3$ no solution; $x=2$ makes the left side less than 0.
When $y=7$: $x=5,3$ no solution; $x=2$ satisfies the condition.
So $x=2, y=7$ is a solution.
When $y=5$, $x=3$ no solution; $5^{x}-x^{5}+x \cdot 5^{2}=19$. When $x=2$, no integer solution;
When $y=3$, $x=2$ gives $3 \times 3^{2}-2^{3}=19$,
So $x=2, y=3$ is a solution.
In summary, $x=2, y=7 ; x=2, y=3$ are the solutions.
!Note In dealing with problems involving prime numbers, Fermat's Little Theorem often plays a crucial role.