A tandem queueing system with two phases and a Markov flow entering into the first phase is studied. Both phases are characterized by one server with a buffer of finite capacity. The service times have an arbitrary distribution function and the service process in the second phase is of Markov-type. An arriving customer who finds the first buffer full is lost. A customer served in the first phase blocks its operation if there is no free waiting place in the second phase at this moment. The stationary distribution of a Markov chain embedded at the instants of customer transitions from the first phase to the second one is obtained. A computing algorithm was derived for PH-distribution of service time in the first server. Numerical examples are given.