Let $w:= w_1 = w_2$
The optimization problem you'd solve is profit maximization:
$\max \Pi = P (x_1 + x_2)^\frac{1}{2} - w x_1 - w x_2$
The first order condition for the $i$-th factor is
$\frac{\partial \Pi}{\partial x_i} = \frac{P}{2} (x_1 + x_2)^{-\frac{1}{2}} - w = 0$
$\implies \frac{P}{2} (x_1 + x_2)^{-\frac{1}{2}} = w$
$\implies \frac{2}{P} (x_1 + x_2)^\frac{1}{2} = \frac{1}{w}$
$\implies (x_1 + x_2)^\frac{1}{2} = \frac{P}{2w}$
$\implies x_1^\star + x_2^\star = (\frac{P}{2w})^2$
Note in this case, both f.o.c. are the same, I did it with the index $i$ to save some algebra.
Note the isoquants are given by
$(x_1 + x_2)^\frac{1}{2} = \overline{Y} \implies x_1 + x_2 = (\overline{Y})^2$
This implies the imput demands can be any combination on the isoquant for $\overline{Y} = \frac{P}{2w}$, which is also an isocost curve because
$w x_1 + w x_2 = \overline{C} \implies x_1 + x_2 = \frac{\overline{C}}{w}$
This implies it is also the isocost for $\overline{C} = \frac{P^2}{4w}$
Edit from discussion in the comments:
Here the input demand functions are not uniquely determined.
The condition I got is that both demands have to add up to $(\frac{P}{2w})^2$. Since the demands are non-negative, we can pick any $x_1^\star$ on the interval $x_1^\star \in [0,(\frac{P}{2w})^2]$.
Then, for the above equation to be satisfied, given an $x_1^\star$, we pick $x_2^\star = (\frac{P}{2w})^2 - x_1^\star$
With this, we can say that the input demands are given by
$x_1^\star \in [0,(\frac{P}{2w})^2]$
$x_2^\star = (\frac{P}{2w})^2 - x_1^\star$
The above describes both interior and corner optimal points, the corner ones being if we pick $x_1^\star = 0$ or $(\frac{P}{2w})^2$, while the interior ones are given by choices of $x_1^\star \in (0,(\frac{P}{2w})^2)$.