It's easy to figure out the answer which is 2. But I am trying to solve it in a different approach. My approach:
$2^x \equiv 2^4 + 2^4 \pmod 7 \Rightarrow x\log_2(2) \equiv 4\log_2(2) + 4\log_2(2) \pmod 7 \Rightarrow x \equiv 4 + 4 \mod 7 \Rightarrow x \equiv 8 \pmod 7 \Rightarrow x \equiv 1 \pmod 7 $
Here, the answer is 1(false) but it supposed to be 2. It works if I do the modular operation by 6.
PS: I read somewhere that it is related to Fermat's little theorem, but can't figure it out. Can someone give a detail explanation on this?