You just need to:
* configure your O365 to send outbound mail to PMG's port 26 (or what you've configured as your internal port)
* configure PMG to send mails for your domain to your O365 (and allow PMG's IP there)
* set the MX record of your domain to point to PMG