Long story short: it's coproporphyrin III. Propionibacterium produces it and S. aureus uses it as a sign to start making biofilms. A biofilm phenotype can improve survival in the face of the immune system, antibiotics, or even just physical stress.
Wollenberg, M. S., Claesen, J., Escapa, I. F., Aldridge, K. L., Fischbach, M. A., and Lemon, K. P. (2014). Propionibacterium-Produced Coproporphyrin III Induces Staphylococcus aureus Aggregation and Biofilm Formation. mBio 5, e01286-14-.
*Anthropomorphism is to be avoided when discussing microbes. The English language, unfortunately, offers many opportunities for anthropomorphism-based rhetoric. In this case, "work together" is a bit misleading as this may not be a coordinated biological phenomenon. It may simply result from one species releasing a molecule and another species noticing it.