Assume that a and b are not co-prime and let the prime p be their common divisor. We denote by vp(n) the exact degree of p which divides n. Note that (n,n−1nℓ−1)=1 for every positive integer n>1 and p does not divide n−1 if it divides n.
Let (x1,y1) and (x2,y2) be two distinct solutions of the given equation and x1>x2. Then bax1−aby1+a−b=ax1−by1 which easily implies that vp(a)=vp(b). Subtracting the equalities a−1ax1−1=b−1by1−1 and a−1ax2−1=b−1by2−1 we obtain ax2a−1ax1−x2−1=by2b−1by1−y2−1, whence x2vp(a)=y2vp(b) and therefore x2=y2. Now a−1ax2−1=b−1bx2−1 obviously implies that a=b, which is a contradiction.