This happened in our last house! The carpet on the first floor had padding under it just like this but green. My husband had to scrape it all off and then treat it with some chemical to get the stuff stuck to the floors off so they could be refinished. It was a shit ton of work for him but he was successful! Is that hardwood or subfloor under the carpets??