(1) ax-|ax-2|=1 or (2) ax-|ax-2|=1?
If (1) then ax-ax-2=1 because ax-2 cannot be negative.
ax-2(a2-1)=1 implies a>1. ax-2=1/(a2-1), x-2=-log(a2-1)/log(a), x=2-log(a2-1)/log(a). So x depends on a.
(2) Two cases: (i) ax<2 (ii) ax≥2.
(2i) ax-(2-ax)=1, 2ax=3, xlog(2a)=log(3), x=log(3)/log(2a).
(2ii) ax-(ax-2)=1, 2=1 which is false, so we can reject (2ii).
Therefore x=2-log(a2-1)/log(a) or x=log(3)/log(2a), depending on interpretation.