In this paper we state a uniqueness theorem for the inverse hyperbolic problem in the case of a finite time interval. We apply this theorem to the inverse problem for the equation of the propagation of light in a moving medium (the Gordon equation). Then we study the existence of black and white holes for the general second order hyperbolic equation and for the Gordon equation and we discuss the impact of this phenomenon on the inverse problems.