Notation. Let a=3x+1, b=3x−1, c=32x. The equation is a+b=c.
Cubing. (a+b)3=a3+b3+3ab(a+b)=c3, i.e.
(x+1)+(x−1)+33(x+1)(x−1)⋅c=2x,
i.e.
2x+33(x2−1)⋅32x=2x.
So 332x(x2−1)=0, hence 2x(x2−1)=0, so x=0 or x=±1.
Check.
- x=0: 31+3−1=1−1=0=30. OK.
- x=1: 32+0=32. OK.
- x=−1: 0+3−2=−32=3−2. OK.
Conclusion. x∈{−1,0,1}.