As you may know, in 2002 the IRS issued new instructions providing that the balance sheet and Schedule M-1 are not required to be completed if the corporation's total receipts for the tax year AND its total assets at the end of the tax year are less than $250,000. So, if the form is not required one option is to disregard the M-2.
Net Income per Books on Schedule M-1 is generally income (from Schedule K, line 23) plus any amounts on Schedule M-1 lines 5 and 6, minus any amounts on Schedule M-1 lines 2 and 3. Line 8 of Schedule M-1 should equal line 24 of Schedule L when all the correct entries are included.
The domestic production deduction will be an adjustment on both Schedule M-1 and Schedule M-2 in order to match line 8 totals of the three columns to Schedule L retained earnings. Other than distributions M-2 often has the same entries as M-1.
But, please understand as it is not required in all circumstances that AAA will equal RE. The most common situation is when distributions are more than earnings since AAA cannot be less than zero.
In regard to how one balances line 8 of the M-2 when the M-1 adjustment is correctly made for an expense not on the books the M-2 will usually balance using the same adjustments as the M-1 for the year. Since the beginning balance next year will be the prior year adjusted balance of AAA, OAA, and PTI accounts there will only be the same annual adjustment needed for the deduction not on the books.
I hope this helps. Please ask if you need further assistance.