We know that $8 = 2^3$, so $8^{5-x} = (2^3)^{5-x} = 2^{3(5-x)} = 2^{15-3x}$. Therefore, the equation becomes:
$$2^7 = 2^{15-3x}$$
Since the bases are equal, we can equate the exponents:
$$7 = 15-3x$$
Solving for $x$ gives:
$$x = \frac{15-7}{3} = \frac{8}{3}$$
Therefore, the solution is $\frac{8}{3}$.