I’m trying to solve Fermat’s problem on sphere for the given triangle ABC using wolfram.I already made out,that in order to find a Fermat’s point i need to build three equilateral triangles on each side of the ABC.
Here is the picture of the planar solution, it is almost similar.
So, the problem for the side $AB$ looks like this: I have two coordinates $(\phi_1,\psi_1)$ for $A$ and two coordinates $(\phi_2,\psi_2)$ for $B$. How can I find coordinates of the third point $R$ so that triangle $ABR$ is equilateral? I tried to use law of cosine on sphere, but it seems not enough...

Arcs $PA$, $QB$ and $RC$ do indeed concur at a point $F$. But it looks like this point is not, in general, the Fermat point (i.e. the one having the sum of its distances from the vertices a minimum): see for instance point $G$ in the figure.
The sphere below has unit radius and the arcs forming the triangle have lengths: $AB=0.92396$, $BC=1.03239$, $AC=1.37534$. The figure was made with GeoGebra.