An hour round trip
If the carpet can be removed, it needs first of all power washing both sides, taking care you don't damage the foam.
Then it needs submerging in whatever product you end up using. Leave it there for a good couple of hours, then have it out and power wash it off again. Extract it off as best you can, maybe have to use a rolling pin to do the foamy side, and let it dry.
If it still smells, repeat. Remember that it will probably be oily so you'll also need to address that issue as well as the smell.