(This answer was written to address the original version of the question, before the second paragraph was added.)
As an example, on S2 it's always possible to define a coordinate patch
ψ:S2→R3
using typical spherical coordinates (r,θ,ϕ), defined such that ψ(x)=(1,0,0) and ψ(y)=(1,0,ϕy). The coordinate patch can be defined everywhere on S2 except in some neighborhoods of the poles. Like any coordinate patch, ψ is injective (although it isn't surjective), so ψ−1 is defined on ψ's image. Then the simplest possible definition for the map f using those coordinates would be
f(λ)=ψ−1(1,0,λϕy) .
There are of course many other possible ways to define f, which take the image of f along different paths on S2 between x and y.
This post imported from StackExchange Mathematics at 2014-10-05 10:04 (UTC), posted by SE-user Red Act