I am trying to take some classes in accounting and it has been a while and I forgotten the basics. However the text doesn't give basic it just goes in full force and I am completely lost. Where can I go to get a simple guide line to follow for posting closing entries? One example is following balances on an Adjusted Trial Balance:

Sales Revenue: $100,000
Cost of goods sold: $50,000
Administrative earnings: $25,000
Retained earnings: $250,000

The closing entry for:

Sales Revenue Debited: $100,000
Cost of Goods Sold: Credit, $50,000
Administrative earnings: Credit $25,000
Retained Earnings: credit $25,000

How did they arrive at this answer?