Try adding new word to account, such as Mary’s Checking, Mary’s Savings etc. etc. Same for yours to group accounts.
Sorry, there is no way to group accounts in the Accounts pane other than the built in Checking Savings, and credit card groups. One thing you can do however is to name the accounts with a prefix like C- for yours, W- for his, and J- for joint. You can also arrange the order that they appear in the list within each group by going to Tools/Account list, selecting an account, and clicking on the arrows at the left to move an account up and down. [These instructions are for QWin 2018]