Man trapped in washing machine rescued after three hours