Setting Mail on Macbook and iPhone?

I have set up my e-mail account on my Macbook and iPhone. My e-mail account is gmail.
When I delete and arrange e-mail from my iPhone, it automatically changes them also on my Macbook and if I log in at gmail.com. But If I try to delete or arrange my e-mails from my macbook, eventually as soon as I close mail on macbook and open mail on my iPhone everything is back to how it was before prior to the changes i made.

Is there a way to make both my macbook and iPhone able to change things and synchronise this change with my other devices? Currently only my iPhone does this.

No idea what "arrange e-mail" means.
Do this…
- Open Mail.
- Click the "Mail" menu at top, and choose "Preferences".
- Click "Accounts".
- Select the Gmail account.
- Select the "Mailbox Behaviors" tab.
- At "Trash", put a check for "Move deleted messages to the Trash mailbox" if that is how you set the iPhone.
At "Trash", REMOVE the check for "Store deleted messages on the server".