Why can A share profit from a transaction funded by B in the example?

Running Partnership (مشاركة) and Daily Products