So the vending machine tore my $5 in pieces. What now?
There is usually contact information for the owner of the machine printed somewhere on it. Call that number. If it is in a business you could always try the clerk.  Whether you get your money back is up to that person, I suppose.