Exponentiating the first equation twice:
loga(loga2)+loga24−128 =a128 becomes
loga(24loga2)=128+a128, so
24loga2=a128⋅aa128, i.e.
224=a(a128⋅aa128). Setting
t=aa128, the right side is
tt and the left side is
(23)23, so by the strict monotonicity of
tt we get
aa128=8. Writing
c=log2a>0, this says
c⋅2128c=3, which is increasing in
c and satisfied by
c=643: indeed
643⋅26=3. So
a=2643.
The second equation gives
x=aa256. Here
a256=264256⋅3=212=4096, so
x=a4096=2644096⋅3=2192.
Clearly
2192≡0(mod8). By Euler’s theorem
2100≡1(mod125), so
2192≡2−8(mod125), the inverse of
256≡6. Since
6⋅21=126≡1(mod125), we get
2192≡21(mod125). The unique residue mod
1000 that is
0 mod
8 and
21 mod
125 is
896.