We can solve like this:

First call 2^{x} = y and note that 2^{2x} = (2^{x})^{2}, we can write the equation as follows:

y^{2} - 24y + 128 = 0

y^{2} - 24y + 144 - 16 = 0

(y-12)^{2} = 16

y -12 = 4 or y-12 = -4

y = 16 or y=8

Remembering y = 2^{x}:

If y = 16, then x = 4

If y = 8, then x = 3

**x = 3 or 4**