Say I have two squares whose centers fall along the circumference of a circle. The circle has radius $x$. The squares have the same height and width $y$. The height of one square is parallel to the height of the other. The angle that defines the separation of the squares on the circle is $z$.
What is the angle $z$ such that the squares just touch? (And how did you work this out?)
Edit
I realize now that the original question is vaguer than it should have been. It is guaranteed in my case that $x$ and $y$ are such that the squares touch only with a separation smaller than 90 degrees. Some answerers have noted that the answer to the question gets complicated when $y$ is large relative to $x$ and the squares touch with separations equal to or larger than 90 degrees.

I suspect that the problem as stated is not well-defined in the sense that the angle asked for does not strictly depend upon the values of $x$ and $y$. Perhaps it should be divided into the different ways the two squares can touch. Here is a diagram to indicate why I have concerns.
Using Geogebra I have only been able to get the squares to intersect at a corner or to share a common side. For these two cases there are two distinct formulas for the angle $\theta$ between their centers.
In the case of intersection at the corners the angle $\frac{\theta}{2}$ has opposite side half the diagonal of the square, or $\frac{\sqrt{2}\,y}{2}$ so
\begin{equation} \theta= 2\arcsin\left(\frac{\sqrt{2}\,y}{2x}\right) \end{equation}
In the case where the two squares share a side the side opposite $\frac{\theta}{2}$ equals $\frac{y}{2}$ so in that case
\begin{equation} \theta= 2\arcsin\left(\frac{y}{2x}\right) \end{equation}
Here is a diagram to show that for the same angle $\theta$ one can have two different values of $y$--one for the corner intersection case and another for the common side intersection case. I could not get the angles precisely equal using Geogebra but close enough to make the point.
Update: The two squares may indeed intersect other than at one or two corners. But the problem is actually not well defined because the solution actually involves a relationship of several interdependent variables:
Rather than a static Geogebra image, one needs a dynamic Geogebra worksheet to understand this. In the link below, the points D and A can be moved. Observe the resulting changes in the positions of the squares, the amount of overlap between the squares and the angle separating their centers.
Dynamic Geogebra Worksheet