Joined squares with concyclic edges [EDITED after feedback. Thanks, YNK]
Two squares are joined at a corner, I am trying to figure out what conditions are needed to ensure that the vertices of one edge from each square all lie on the same circle. In the diagram below, the edge vertex sets that I would like to be concyclic are $\{A,B, F, G\}$ or $\{A,B, G, H\}$.

Three ways to start with one of the squares and generate another that meets the condition are shown below.
I guess my questions are: Are these the only solutions? If so, how can we prove this?

Solution 1
Draw any circle through $A$,$B$

Take rays from $B$ through the $C$ and the centre of the circle, $O$, label the points where they cross the circle again as $F$ and $G$.

$\angle CFG = \angle BFG = 90^{\circ}$. I think it should be easy to show that $A$, $C$, $G$ are collinear using symmetry. This makes $\angle GCF = \angle CGF = 45^{\circ}$, so that $\triangle GCF$ is isosceles and $CF=FG$. So we can 'complete the square' to get what we want.

In terms of transformations, this solution can be obtained from the initial square by a rotation about $C$ of $135^{\circ}$ and a scale (centre $C$) by a suitable factor to make $F$ coincide with the circle.
Solution 2
Starting as before, with any circle through $A$, $B$, we can draw a line through the centre of the circle and $C$. Reflecting the square in this line gives a congruent one with the desired property.

Solution 3
We can obtain another solution by applying starting with solution 1 and applying the operation (reflection) used for solution 2. This leads to the square labelled '3' below.

We could have started with solution 2 and applied the operations that were used for solution 1 (rotate and scale) as, I believe, these operations commute.
There is a slight difference between solution 3 and solutions 1 and 2. Starting from the point of contact and reading the edges in anti-clockwise order, the second edge coincides with the circle for solutions 1 and 2, while the third edge coincides for solution 3.
Update
Some playing with Geogebra seems to confirm that there are only 4 squares with the property, once the joining point $C$ is fixed. In the illustration below, $C$ is chosen, point $H$ can move freely around the circumference of the circle, parameterised by $\alpha$, the angle that the radius to $H$ makes with the positive $x$-axis.
Extending $HC$ to $E$ and using the diameter from $E$ leads to $F$ for which $\angle FHC = 90^{\circ}$. Varying $\alpha$ between $0$ and $2 \pi$, we can generate a square whenever $|HF|=|CH|$.
The right hand plot shows the graphs for $|HF|$ and $|CH|$ as $\alpha$ varies, this seems to confirm four solutions that can lead to a square.


@Edward's solution hints at the idea that this isn't a result about squares, but about similar triangles.
Consider $\triangle OAB\sim\triangle OA'B'$, with $|OA'|=\lambda |OA|$ and $|OB'|=\lambda|OB|$ for some scale factor $\lambda$, where the triangles have opposite orientations in the plane. We seek conditions under which $A$, $B$, $A'$, $B'$ are concyclic.
Arranging the triangles so that $O$ lies at the origin, and the angle bisector of $\angle AOA'$ aligns with the $x$-axis, we can write
$$A=a\operatorname{cis}\alpha \qquad 
B=b\operatorname{cis}\beta \qquad 
A'=\lambda a\operatorname{cis}(-\alpha) \qquad
B'=\lambda b\operatorname{cis}(-\beta) \tag1$$
where we abuse notation to define $\operatorname{cis}\theta := (\cos\theta,\sin\theta)$.

The perpendicular bisectors of $\overline{AB}$ and $\overline{A'B'}$ meet at the ostensible circle center
$$K := \left(
\frac{(a^2 - b^2) (1 + \lambda)}{
 4 ( a \cos\alpha - b\cos\beta )}, 
\frac{(a^2 - b^2) (1 - \lambda)}{
 4 ( a \sin\alpha - b \sin\beta)}\right) \tag2$$
The four target points will be concyclic iff $|KA|=|KA'|$, which, for non-degenerate triangles, amounts to the conditiion
$$(1 -\lambda^2) \sin(\alpha+\beta)=0 \tag{$\star$}$$
Thus, we have these cases:

*

*If $\lambda=\pm1$, then $A$, $B$, $A'$, $B'$ determine a necessarily-cyclic isosceles trapezoid.

 

*

*If $\sin(\alpha+\beta)=0$, then $\alpha+\beta$ is a multiple of $\pi$, which implies that $A$, $O$, $B'$ are collinear (likewise, $A'$, $O$, $B$).

 
Note that, in the original context with the squares, the latter condition says that the diagonal of one square is collinear with an appropriate side of the other.
