Check your electric panel box. You need a 30 amp breaker for the electric dryer and a 20 amp for the washer. Oh and also check for anything else hooked up to the same circuit breaker that maxes out the amperage. And last thing - sometimes breakers themselves go bad over time and keep popping. I would have the breaker replaced, it is only like $15 at a hardware store and would save you so much stress and frustration if this is the issue. I had a similar problem with an electric stove, was about to send it back to the store before a friend who is an electrician suggested to try a new breaker - everything works perfect for more than couple years now!
Hope it works good luck!