If you can just put it out by the curb for scrap as someone will likely be around to pick it up to sell it for scrap.
If not put an ad on Craigslist stating you have a scrap washer and dryer to give away and someone will likely come by to get it for scrap metal.
Or you could take it to a scrap yard yourself where they will give you a little money for it.