ABSTRACT To understand how phosphorus (P)-bearing molecules are formed in star-forming regions, we have analysed the Atacama Large Millimeter/Submillimeter Array (ALMA) observations of PN and PO towards the massive star-forming region AFGL 5142, combined with a new analysis of the data of the comet ...