In this paper, we study a passenger-taxi matching queue system. The system is modeled as a birth-and-death process. Since the system is so complex, we mainly focus on numerical analysis. A centralized system and a decentralized one are considered. In the centralized system, the government sets thresholds for both passengers and taxis to maximize the social welfare. We analyze the performance measures of this model, discuss the range of two thresholds that ensures positive social welfare, and numerically give the upper bound of threshold. In the decentralized system, passengers and taxis determine whether to join the system or balk based on their individual utility functions. Further, we consider the government's tax and subsidy to the taxi drivers. Numerical results show that the social welfare function in the centralized system is concave with respect to the thresholds and the government central planning benefits the society. In the decentralized system, no matter what the passenger and taxi arrival rates are, the social welfare is concave with respect to the taxi fare. Moreover, we analyze the effect of the arrival rates and the benefits of the tax and subsidy.