Imagine a particle (a photon, say) travelling towards an observer, standing on a planet (or a neutron star or anything heavy). The photon has an extremely high frequency, as seen in the frame of the observer. Actually, it has so much energy, that it’s just about collapsing into a black hole. As the photon gets deeper down the gravity well of the planet/neutron star, it gets blueshifted, which increases the energy, and the photon turns into a black hole.

Another observer lives on another planet, which is travelling towards the first observer at a significant speed. In the frame of this observer, the photon isn’t quite as close to collapse into a black hole. In fact, the blue shift of the photon caused by the gravity well of the first observers planet isn't enough to transform the photon into a black hole.

Now, both observers have to be right. But how can it be, that the photon is and isn’t collapsing into a black hole? It seems that the photon has two histories, which sometimes can be acceptable. But in this case, imagine that the first observer gets swallowed by the newly formed black hole. Then the second observer can travel to the first observer’s planet and find out, which make a serious contradiction.

What is the solution of this thought experiment?