A and B agree to a Rs. 100,000 partnership, each committing Rs. 50,000, with equal profit sharing. Before A pays, B uses his Rs. 50,000 to earn Rs. 10,000 profit. Later A's Rs. 50,000 is used in a transaction that loses Rs. 2,000. Net profit is Rs. 8,000, so each receives Rs. 4,000.
The example is useful because it separates the legal roles from the cash movement. Once those roles are clear, the same principle can be applied to more complex commercial cases.