This is why accounting (though not double entry accounting) was invented...
To keep things equitable, then yes, Person B giving $10 cash to Person A or buying $20 of groceries for the "common pot".
I suggest a simple ledger sheet. Here's a hypothetical scenario where each person makes two purchases during the month for the "common pot":
A B
- -
Purch #1 $20
Purch #2 $30
Purch #3 $40
Purch #4 $50
EOM Pymt $20
EOM Rcvd: $-20
--- ---
$70 $70
TOTAL SPENT: $20+30+$40+$50 = $140
EQUAL CONTRIBUTIONS: $140/2 = $70
EQUALIZING PAYMENT: $70 - $50 = $20
In this case, at EOM (end of month), Person A pays $20 to Person B to ensure that they both contributed an equal amount.
Clear as mud?