This paper considers a two-station tandem production system consisting of make-to-stock and make-to-order facilities. The make-to-stock facility produces components which are served for external demands as well as internal make-to-order operations while the make-to-order facility processes customer orders with the option to accept or reject. We address the problem of coordinating the decision of when to accept customer order and when to satisfy component demand that maximizes the total expected discounted profit. To deal with this issue, we present a Markov decision process model of two-station tandem queueing system and characterize the structure of the optimal policy. We investigate the marginal impacts of system parameters on the optimal policy and implement a numerical experiment for comparing the performance between the optimal policy and the static policy with two fixed thresholds.