Example 8. There are two four-digit numbers, Jia and Yi. The common logarithm of Yi is $A+\lg B$, where $A$ and $B$ are natural numbers. The sum of the thousand's and hundred's digits of Jia equals $5B$, and the sum of the unit's and ten's digits of Jia equals the difference between Yi and Jia plus $B$. Find the two numbers.
Let the number A be $x y z u$, (where $x, y, z, u$ are all single-digit natural numbers).

From $x+y=5 B$, using the digit domain: $0<x+y \leqslant 18$, i.e., $53 \leqslant 18$. It can be known that $1 \leqslant B \leqslant 3$, thus the number is $B \times 10^{4}$ and $A=3$.

Since the difference between the second number and the first number $=z+u-2 \leqslant 18-2=16$, the thousand's digit $x=B-1$, and the hundred's digit $y=9$. Therefore, $9+(B-1)=5 B, B=2$, so the second number is 2000. Thus, $x=1, y=9$. Also, $(9-z) \times 10+(10-u)$ $=z+u-2$, i.e., $11 z+2 u=102$,
we have $u=\frac{102-11 z}{2}$. By the digit domain of $u$, we get: $1 \leqslant u \leqslant 9$.
So $7 \leqslant z \leqslant 9$.
Since $z$ must be even, we get $z=8, u=7$. Finally, the first number is 1987, and the second number is 2000.