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.


It is sufficient to place the given squares so that the side of each lies in a straight line with the diagonal of the other.

Thus $AC$ is collinear with $CG$ and $FC$ with $CB$.
Then by similar triangles$$\frac{AC}{BC}=\frac{FC}{GC}$$making$$AC\cdot GC=BC\cdot FC$$
Hence $AG$ and $BF$ are intersecting chords in a circle and points $A$, $B$, $G$, $F$ are concyclic.
Addendum: The condition can be met in a second way of course, by rotating $CG$ $180^o$ about point $C$ as in the figure below, where collinear side and diagonal now overlap instead of running in opposite directions.

Since by similar triangles$$\frac{CA}{CB}=\frac{CF}{CG}$$then$$CA\cdot CG=CB\cdot CF$$and points $A$, $B$, $F$, $G$ are concyclic.
There seem to be only two situations where given square $ABCD$ and non-equal square $CEGF$, in contact at $C$, can have points $A$, $B$ concyclic with $F$, $G$.  But there are likewise two situations where points $G$, $E$ are concyclic--not with $A$, $B$, however, but with $D$, $B$.
For $CG$ rotating $360^o$ about point $C$, yields side/diagonal alignment four times, with $A$, $B$, $F$, $G$ concyclic in two of them and $D$, $B$, $E$, $G$ in the other two.  The first two we've seen, where $CG$ runs "east-west"; in the second two, shown below, $CG$ runs "north-south".
Thus side/diagonal collinearity is sufficient to make either $A$, $B$, $F$, $G$ or $D$, $B$, $E$, $G$ concyclic.  I think side/diagonal collinearity is also a necessary condition, but can't yet prove it.


