Let us put $2^x=a,3^x=b$ to remove the indices to improve clarity
So, $8^x=(2^3)^x=(2^x)^3=a^3$ and similarly, $27^x=b^3$
$12^x=(2^2\cdot3)^x=(2^x)^2\cdot3^x=a^2b$ and similarly, $18^x=ab^2$
So, the problem reduces to $$\frac{a^3+b^3}{ab(a+b)}=\frac76$$
$\displaystyle\implies 6(a^2-ab+b^2)=7ab$ as $a+b\ne0$
$\displaystyle\implies 6\left(\frac ab\right)^2-13\cdot\frac ab+6=0$
$\displaystyle\implies \frac ab=\frac32$ or $\dfrac23$
So, $\displaystyle\left(\frac23\right)^x=\frac32$ or $\dfrac23$
If $\displaystyle\left(\frac23\right)^x=\frac32\implies\left(\frac23\right)^x=\left(\frac23\right)^{-1}\iff\left(\frac23\right)^{x+1}=1$
Similarly, if $\displaystyle\left(\frac23\right)^x=\frac23, \left(\frac23\right)^{x-1}=1 $
Now if $\displaystyle u^m=1,$
either $\displaystyle m=0,u\ne0; $
or $\displaystyle u=1$
or $\displaystyle u=-1,m$ is even