From Eva Zerz:
The possible distances can easily be computed as 0, (-1+sqrt(5))/2 and
(1+sqrt(5))/2 (if "A, B, C in a straight line" does not infer that B
has to be between A and C).
For if A(-1/0) and B(0/0), then C(c/0), D(d1/d2) with d1^2+d2^2=1,
(d1-c)^2+d2^2=1 and (d1+1)^2+d2^2=(c+1)^2. The first two equations give
c(c-2d1)=0, hence either c=0 or c=2d1. The first and third equation yield
2d1+1=c^2+2c, which results in the golden ratio equation c^2+c-1=0 when
2d1 is replaced by c.