Dynamic matrix product ansatz and Bethe ansatz equation for asymmetric exclusion process with periodic boundary