Company A entrusted company B to develop and produce a product, using company A's trademark for sale; if company B changed to company B's trademark for sale is considered infringement?

What are you selling ah, for example, you are buying office paper, and then they found that if the production of their own brand will earn more, then after you, buy others brand paper at the same time to buy their own, because you are directly communicating with the customer, so you can recommend to the customer your brand, so it is not infringing.