Yes, that's a good setup. Another way to see this is to take the complement of the probability of having one boy and one girl, which would be the probability of having no boys (or equivalently all girls) or no girls (or equivalently all boys). This probability would be $$\underbrace{\frac{1}{2^n}}_{P(\text{all boys})} + \underbrace{\frac{1}{2^n}}_{P(\text{all girls})} = \frac{2}{2^n}$$
The actual probability would be $1$ minus this value, or equivalently $$1 - \frac{2}{2^n}$$
You are trying to find the minimum value of $n$ such that this probability is greater than $p=0.8$. This inequality is $$1-\frac{2}{2^n} > p \to \frac{2}{2^n} < 1-p$$
To solve this, multiply by $2^n$ on both sides to get $$2 < (1-p) \cdot 2^n$$
Divide by $0.2$ to get $$\frac{2}{1-p} < 2^n$$
Take the log base 2 to get $$\log_2\left(\frac{2}{1-p}\right) = 1 - \log_2(1-p) < n$$
The LHS is approximately $3.3$ for $p = 0.8$, and since $n$ must be an integer, the minimum value of $n$ is $4$.