First of all, you need to confirm whether the other party has applied for a patent. If so, your behavior is a patent infringement.
Secondly, if the other party has not applied for a patent, it depends on whether the other party protects the production method as a technical secret? How did you obtain it? If it constitutes a technical secret and you obtain it through improper means, it will infringe the other party's trade secret rights.
Finally, if the other party has neither applied for a patent nor protected it as a trade secret. Then you can use it with confidence.