We have,
a=2x−12−x−2
a=2x−1×2−(−x−2)
a=2x−1+x+2
a=22x+1
2x+1=log2a
2x=log2a−1
x=12(log2a−1)
Since,
b=2−x2x+1
b=2−x×2−(x+1)
b=2−x−x−1
b=2−2x−1
−2x−1=log2b
−2x=1+log2b
x=−12(1+log2b)
Hence, the values of x are 12(log2a−1) and −12(1+log2b).