Today, the advent of new technologies, globalization of markets, customers' varied needs, and increasingly fierce competition, are making SMEs seek to improve engagement with their suppliers, and cost management practices in order to survive. SMEs clearly need to focus on the interests of the entire supply chain by enacting win-win policies. In this study, we investigate a two-level inventory model featuring a manufacturer and a buyer in the competitive market with the policy of producing new products. Imperfect quality products and the capacity to rework are also considered in the model. In other words, because of the competitive nature of the market, any increase in price leads to a decrease in demand. The mathematical model is proposed over two scenarios: a scenario where shortage can occur, and one with no possibility of shortage. The objective function of the mathematical model revolves around the central goal of maximizing the total profit of the supply chain considering both independent and joint optimization by the supply chain members. A new algorithm is proposed to solve the mathematical model whose applicability is evaluated by giving a numerical example to the analysis software MATLAB. The results are analyzed and discussed using a sensitivity analysis approach.