According to this post, borax may be helpful https://www.hometalk.com/29278231/10-uses-for-borax
Use a carpet scrubber with just water to remove excess soap.
I would first blot up the excess using either a Sham Wow cloth, I get the immitation ones at the Dollar Tree to get that soap of before you add any water to the situation. The also make some super absorbant blue shop towels on a roll which might absorb it up too.
Then I would use my carpet cleaner by adding some degreaser to the water reservoir, get it a little wet, then suck it up, repeat till gone. The degreaser I use is Dollar Tree Awesome Degreaser.... our local car detailer uses it also for all the car interiors.
Borrow, buy or rent a carpet cleaner that sucks up the dirty water. It may take several tries to get them cleaner.