Using coordinate geometry. Assume that the vertices (in order) are $(0,a), (0,0), (a,0), (a,a)$ and that $P$ is $(u,v)$. Then $ \begin{align} u^2+(v-a)^2 &= x^2,\tag{1} \\ u^2+v^2 &= y^2, \tag{2} \\ (u-a)^2+v^2 &= z^2 \tag{3}. \end{align} $ We can "solve" for $v$ in terms of $a$ by subtracting $(2)$ from $(1)$; similarly for $u$. Since the steps are straightforward, I am just posting the answer here: $ (u, v) = \left( \frac{a^2 + y^2 - z^2}{2a}, \frac{a^2 + y^2 - x^2}{2a} \right). $ Plugging this in $(2)$, we get: $ (a^2+y^2 - z^2)^2 + (a^2 + y^2 - x^2)^2 = 4a^2y^2. $ $ \implies a^4 + y^4 - (a^2+y^2)(x^2+z^2)+\frac{x^4+z^4}{2}=0. $ This is a quadratic equation in $a^2$(=area of the square) and can be solved.
Note. I do not yet understand whether both the roots of the quadratic are true solutions or not.