Having two points of a square and only a compass, how to find the remaining two? I remember being presented a mathematical puzzle some years back that I still can't solve. The problem is defined as follows:

We have two points on a plane, and using only a compass, how do we find other two points, so that all four of them would be vertices of a square?

I'm not sure whether the first two points were supposed to be vertices of the same edge of a square or not, so solutions to both variants are welcome.
Here is a description of one of the constructions:

Given the two points $\color{maroon}0$ and $\color{maroon}d$ that form one side of the square:


Construct the five $\color{gray}{\text{gray}}$ circles of common radius $\color{maroon}{od}$ shown in the
diagram and locate the points  $\color{maroon}a$, $\color{maroon}b$,
and $\color{maroon}c$.
Construct the two $\color{maroon}{\text{maroon}}$ circles: one with
center $\color{maroon}c$ and radius $\color{maroon}{cb}$, and one
with center $\color{maroon}d$ and radius $\color{maroon}{ad}$. Note
that $\color{maroon}{ad}$ and $\color{maroon}{cb}$ have the same
length.
Locate the point of intersection $\color{pink}e$ of the two maroon
circles.
Construct the $\color{pink}{\text{pink}}$ circles of radius $\color{pink}{oe}$ at centers
$\color{maroon}c$ and $\color{maroon}d$.
The point of intersection,  $\color{pink}f$, of the pink circles  is a vertex of the
square.
Draw the $\color{darkgreen}{darkgreen}$ circle centered at $\color{pink}f$ of radius $\color{maroon}{od}$.
The point of intersection,  $\color{darkgreen}g$, of the darkgreen
circle with the gray circle centered at $\color{maroon}d$ is the
final vertex of the square.

 


Justification of step 5: 

From step 1., $\color{maroon}{aboc}$ is a rhombus with common side length $  l(\color{maroon}{co})$. 
Since the point $\color{pink}e$ is equidistant to the points $\color{maroon}c$ and $\color{maroon}d$ , the segment $\color{pink}e\color{maroon}o$ is perpendicular to the segment $\color{maroon}{cd}$. Since $\color{pink}f$ is equidistant to the points $\color{maroon}c$ and $\color{maroon}d$, the points $\color{pink}e$, $\color{pink}f$, and $\color{maroon}o$ are colinear and the segment $of$
is perpendicular to  the segment $\color{maroon}od$.  

We need to show that $l(fo)=l(co)$.
Proceeding with some abuse of notation:

Considering the rhombus $aboc$, we have 
$$
cb^2+ao^2=2(ac^2+co^2 );
$$
or, since $ao=co=ac$,
$$ 
cb^2=3co^2.
$$
Since $cb=ce$, we have
$$\tag{1}
ce^2=3co^2
$$
Considering now the right triangle $ceo$:
$$\tag{2}
ce^2=eo^2+co^2.
$$
Combining equations $(1)$ and $(2)$:
$$\tag{3}
eo^2=2co^2.
$$ 

Considering now the right triangle $cfo$:
$$\tag{4}
cf^2=fo^2+co^2
$$
since $cf=oe$:
$$\tag{5}
oe^2=fo^2+co^2 
$$
From $(3)$ and $(5)$ now, we finally obtain
$$
 fo=co,
$$
as desired.
There's an easier solution with a collapsible compass.
Let the final square side (distance between two initial points) be equal to 1.

First, draw three small circles with the radius of 1
Then draw tree large circles with the radius of sqrt3.
Now all you need is to find sqrt2. That will be outer crossing of the large circles. Draw two medium circles centered in your initial points.
The crossing of the medium circles with the first two small ones are the top points you need.

See diagram