Suppose we have two 4-velocity vectors and at the same point in curved spacetime. (This avoids complications such as parallel transport. Intuitively, think of the two objects as not necessarily overlapping, but close enough that we can neglect curvature etc.)
Consider firstly inertial frames in Minkowski spacetime. Using coordinates corresponding to some observer , the components of a different observer satisfy:
[The expression bothered me, because time-dilation is mutual, so one might argue a case for instead. But the key point is, the derivative occurs along the direction of . Another way to check the expression is to write . This is a contraction of the 1-form with the vector , as I explained previously. The “flat” symbol just means is the 1-form dual to . Conversely, along we have , which is not a contradiction!]
With a view to generalisation, we re-express the earlier displayed formula using vectors in place of coordinate components: . This is also more elegant. The reader may find better notation than , but this is the relative velocity of from ‘s frame. Rearranging,
This vector lies in the local 3-space of , since , so in particular is spatial. It has length , which is the overall relative speed, and satisfies . If you want, there is also a decomposition , where is a unit vector. Conversely, the relative velocity of with respect to is . This also has length , but lies in ‘s 3-space. However, unlike the Newtonian case, , unless . See Tsamparlis (§6.4) for discussion.
All the vector formulae above transfer unchanged to curved spacetime, for 4-velocities at the same event, including worldlines with acceleration. This can be justified using local inertial coordinates. While the formulae do appear in the literature, with one example being Bini 2014 §6, the topic of observer measurements in general is not widely promoted. I recall two separate conversations with senior relativists who were unfamiliar with use of the Lorentz factor in a curved spacetime context.
For comparison, one quantity which should not be naively ported across from special relativity is acceleration. In curved spacetime, the 4-acceleration requires the covariant derivative, which depends on curvature (and possibly other choices). The reader curious about relative acceleration could try Jantzen, Carini & Bini: their 1995 paper , and an unfinished book last updated in 2013.