Dealing with the damage from a burst washer hose or dust-clogged dryer duct is expensive and frustrating. Upgrading both those items will make your appliances safer, more efficient and last longer. Image from osseous.
In both instances, you want to replace the hose or duct with a metal version if your appliances don't already have them, and if you do, check for wear or breaks. This Old House recommends a steel-jacketed hose (more durable) for the washer and a metal duct (less flammable) for the dryer. Check back every six months to make sure they're in good shape and replace the hose every five years. For step-by-step visual instructions on how to upgrade both, hit the link below. (Warning: it's a slideshow.)
How to Maintain a Washer and Dryer [This Old House]