My best guess is that you need to have your sewer cleaned. A washing machine expels probably the greatest amount of water in the shortest time of anything in your house. If you have a partial obstruction in the sewer, you will certainly see a backup when the machine empties. Flushing the toilet only puts several gallons of water into the sewer. If this just started happening, I would say the sewer is backing up. If you have always had this problem, the drain may be constructed in such a way that it cannot handle a large volume of water at that point of entry.