An inverse problem for the Burgers equation and its hyperbolic regularization