How would I solve the following problems (solutions are provided!) without guessing and checking:

If n is a positive integer and $\displaystyle \frac{n+1}{2^n} = \frac{1}{2}$, find n. (n = 3)

If $\displaystyle 2^x + 2^x + 2^x + 2^x = 2^7 $, what is x? (x = 5)