as according to special relativity the relative speed is $u'=\frac{(u-v)}{1-(uv)/c^2}=\frac{0}{0}$ because $v=c$ the speed of second photon with respect to any inertial observer and $u=c$ speed of first photon with respect to same observer so $u'$ the speed of first with respect to second photon should also be $c$ according to second postulate of special relativity but how
1 Answer
בס''ד
Electromagnetic waves propagate with a particular velocity. Photons are the generally results of electronic state transitions (typically within a atom or molecule) from one state to the next and are only apparent when a wave emission event or detection event occurs, changing some system state with a probability given by the Einstein coefficients and their associated events, "where $B_{12}$ and $B_{21}$ are the Einstein coefficients for photo absorption and induced emission respectively" 1 and "where $A_{21}$ is the Einstein coefficient for spontaneous emission." 1
Thus to speak of the speed of two photons relative to each other, each photon event is associated with its respective coefficient type - $A_{21}$ spontaneous emission [release]; $B_{12}$ photo absorption [detection]; and $B_{21}$ induced emission [amplification]. Each photon can be labeled Photon P1 or Photon P2, and also labeled by its photon state change type - be it "spontaneous emission", "photo absorption", or "induced emission".
Thus, the Lorenz Transformation article and Einstein's Second Postulate of Special Relativity between the two events can be applied to find their relative velocity.
Generally for two events $E_{1}$ and $E_{2}$ (with associated subscripts 1 and 2 respectively) we have generally in vacuum free space:
Here we have two photons $P1$ and $P2$ and hence four events (to define the velocities for each photon) ${1}_{P1}, {2}_{P1}, {1}_{P2}$ and ${2}_{P2}$ respectively for each photon $P1$ and $P2$.
Thus,
${\displaystyle c^{2}(t_{{2}_{P1}}-t_{{1}_{P1}})^{2}-(x_{{2}_{P1}}-x_{{1}_{P1}})^{2}-(y_{{2}_{P1}}-y_{{1}_{P1}})^{2}-(z_{{2}_{P1}}-z_{{1}_{P1}})^{2}=0\quad {\text{(light-like separated events ${1}_{P1}, {2}_{P1}$ for photon P1)}}}$
and
${\displaystyle c^{2}(t_{{2}_{P2}}-t_{{1}_{P2}})^{2}-(x_{{2}_{P2}}-x_{{1}_{P2}})^{2}-(y_{{2}_{P2}}-y_{{1}_{P2}})^{2}-(z_{{2}_{P2}}-z_{{1}_{P2}})^{2}=0\quad {\text{(light-like separated events ${1}_{P1}, {2}_{P2}$ for photon P2)}}}$
are the results of each photon P1 and P2 being comprised of light in vacuum.
The formula referenced in the question is for relativistic Parallel Velocities 3:
In the case where two objects are traveling in parallel directions, the relativistic formula for relative velocity is similar in form to the formula for addition of relativistic velocities.
${\vec{v}_{B || A }}= \frac {\vec{v}_{B} - \vec{v}_{A} } {1 - \frac {{\vec{v}_{B}}{\dot{}}{\vec{v}_{A}}}{{c^2}}} $
This formula is derived from two light-like separated events. Equally valid (and this second similarly-derived formula holds also for ${\vec{v}_{B}}{\dot{}}{\vec{v}_{A}}={c^2}$)
${\vec{v}_{B || A }}({1 - \frac {{\vec{v}_{B}}{\dot{}}{\vec{v}_{A}}}{{c^2}}})= \vec{v}_{B} - \vec{v}_{A} {\text{ (Equation 1)}}$
Since the question is restricted to parallel velocities for P1 and P2 (and not anti-parallel velocities) then $\hat{v}_{B} \dot{} \hat{v}_{A} = 1$ so $ \vec{v}_{B} = \vec{v}_{A} = c \hat{v}$ where $\hat{v}$ is the unit vector pointing in their mutually equal direction of travel (since their velocities are parallel).
To paraphrase then your question is how can the second photon P2 have the same velocity as P1 of c with the common definition of relative velocities, in the reference frame of P1? (This since the speed of light is the same in all inertial reference frames, and P1 is assumed to be a valid inertial frame.)
First of all the relative velocity is not defined in such a case from the formula (Equation 1).
So ${\vec{v}_{B || A }} = c\hat{v}_{B || A }$ does not at all violate the definition of relative velocity given in Equation 1. It is possible for the relative velocity magnitude to be "c"!