Let k be the number of digits of a. Therefore, 10k−1≤a<10k. We have ba=b.a=b+10ka and consequently ba−b2=10ka. Since (a,b)=1, (a−b2,b)=1; therefore, ba−b2 is the irreducible form of 10ka. Thus, for some natural number s, sb=10k and s(a−b2)=a.
Now, a−b2∣a and (a−b2,a)=1. Hence, a−b2=±1, but ba−b2=10ka>0, so a−b2=1. Therefore, a=b2+1 and b1=10ka.
Since a≥10k−1, we have b1=10ka≥101 which implies b≤10. On the other hand, ab=b(b2+1)=10k, so prime factors of b and b2+1 are only 2 or 5. Since b≤10, we have b∈{1,2,4,5,8,10}. A simple calculation shows that only for b=2, b(b2+1) is a power of 10. For this case, a=5 and k=1. Therefore, 25=2.5, this is the only solution.