How to find the distance along a sphere from an angle? Imagine there are two points on planet Earth and a light is shone from one to the other by reflecting off an object 500km up (think of this as a mirror oriented parallel to the surface right below it). Let us assume the Earth is a perfect sphere.  As the distance between the points increases, the angle that the light is received at increases with a limit of 90 degrees which corresponds to a tangent of the sphere.  I would like to know how far apart the two points along the sphere are as a function of this angle.
To try to solve it I first notice that the angle of incidence equals the angle of reflection. So we can draw an  isosceles triangle with the reflector at the top and the two points as the other two vertices.  The height of the triangle is a function of how far apart the two points are. But now I am stuck.
The radius of the Earth is 6371km.

Analytical geometry calculation. You want intersection between ( meridians of ) sphere and cone of semi-vertical angle $\theta$ from a celestial mirror at $O$.
$$ z^2+r^2=R^2 \tag1$$
and a ray ( generator of cone ) from the mirror
$$ r \cot \theta-z = R+h\tag2$$
Eliminate $z$ between (1),(2)
$$ r^2( 1+\cot^2 \theta)  -2 a r \frac{\cos \theta}{\sin \theta} + (a^2-R^2) \tag3$$
$$ r^2-2 a r \frac{\cos \theta}{\sin \theta}+ h (2R+h)\sin^2 \theta $$
The quadratic has two roots
$$ \frac{r}{\sin \theta}= a \cos \theta \pm \sqrt{ a^2 \cos^2 \theta -h(2R+h)} \tag4$$
$-ve $ sign for required spherical cap nearby and $+ve,$ if the ray is produced to pierce second half hemisphere.
By geometry of right triangles we can find when the ray is tangential to the sphere:
$$ (z_m,r_m)= \dfrac{h(2R+h)}{(R+h)},\dfrac{R\sqrt{h(2R+h)}}{(R+h)}\tag5$$
is the required relation, graphed.
If $OM$ is along polar axis connecting north/south poles, the the latitude, co-latitude of required circle circle of horizon which has
$$ \cos^{-1}\frac{r_m}{R}, \sin^{-1}\frac{y_m}{R}\tag6$$

